I am developing an MVC application and I have a requirement where there should be a instant client-side validation as soon as I enter a number in a textbox. So I need a regular expression to write as a validation on top of the property in model class for that field.
^[1-9]+[0-9]*00$ works for numbers divisible by 100 but am looking an expression which checks if the number divisible by 500. Can anyone help?
Here is the eg for model validation where it checks if a number is divisible by 100
[Required] [RegularExpression(@"^[1-9]+[0-9]*00$ ", ErrorMessage = "Number not divisible by 100")]
public string EmployeeNumber{ get; set; }
^[1-9]\d*[05]00$
? – Alexander Mashin