Saturday, 6 March 2021

MVC - Validation - Display proper name in error message

Watch this example on YouTube

 

 

  [RegularExpression(@"^([0-9]\d*)(?:\.[05]0?)?$", ErrorMessage = " {0} contains invalid characters")]
        [Display(Name = "Salary abc...")]
        public Decimal Salary { get; set; }

No comments:

Post a Comment