Hi
In below Reqgular expressiob i want - Required & MaxLength condition should be separate.
In Special Character i want to allow only Alphabet , Space & BackSpace
[DataType(DataType.Text)]
[RegularExpression(@"^[a-zA-Z'.\s]{1,25}$", ErrorMessage = "Special Characters not allowed")]
[Required(ErrorMessage = "Please enter Location"), MaxLength(25)]
[Display(Name = "Description")]
Thanks

Rijwan AnsariRank #82 · 24.2K reputationPosted Jun 15, 2021, 1:01 PM EDT
Ramco RamcoRank #462 · 5.4K reputationPosted Jun 15, 2021, 11:30 PM EDT
Hi Rizwan
In regular expression i wanted only first character should be Alphabet , Numeric digits not allowed.
Thanks