Skip to content

Instantly share code, notes, and snippets.

@JIOO-phoeNIX
Created October 12, 2020 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JIOO-phoeNIX/29e3ec3a06853d0d7e617778e1e08c70 to your computer and use it in GitHub Desktop.
Save JIOO-phoeNIX/29e3ec3a06853d0d7e617778e1e08c70 to your computer and use it in GitHub Desktop.
using System;
using System.ComponentModel.DataAnnotations;
namespace BlazorAppWithCockroachDB.Model
{
public class AccountModel
{
[Required(ErrorMessage = "Balance is required")]
[Range(minimum: 1, 99999999, ErrorMessage = "Minimum allowed balance is $1")]
public int balance { get; set; }
[Required(ErrorMessage = "Name is required")]
public string name { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment