I have using ASP.NET MVC 5 and for validation I am using the regular Jquery unobtrusive validation library. Currently I am facing an issue, The regular expression validation is working all right on client side but on server side its not validating the value.
[RegularExpression(@"^[0-9]{19}$", ErrorMessage = "Invalid Value")]
public string Value{ get; set; }
this is the simple regular expression to validate 19 digits. Its working fine on client side it'll now allow ' or - or any thing to pass on but if i submit directly to server than the model is not being validated.
Do I need to do some thing special?