what is validation expression for at least 150 characters
in asp.net regular expression
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khargesh RajputPosted Feb 25, 2015, 3:02 AM
(\s|.){150,}Suraj SahooPosted Feb 25, 2015, 2:58 AM
This will set the range, else use the MaxLength property and set to 150. This should work.
If I have anticipated correct.
[Required(ErrorMessage = "Name is required.")]
[StringLength(40, ErrorMessage = "Name cannot be longer than 40 characters.")]
public string Name { get; set; }
Accept if helps anyway.
Thanks
Guest UserPosted Feb 25, 2015, 2:49 AM
dot for any character, 150 minimum, no maximum.