Two ways:
Fisrt:
[StringLength(50, ErrorMessage = "The {0} must be at least {2}
characters long.", MinimumLength = 10)]
Second:
Regular expression
[RegularExpression(@"^.{10,}$", ErrorMessage =
"Minimum 10 characters required")]
No comments:
Post a Comment