Anand MR

Anand MR

  • NA
  • 39
  • 19.9k

Regex DataAnnotations

Oct 12 2015 3:18 AM
I am using the following Regular expression pattern
for Name filed vaidation in MVC5 Application
@"^[a-zA-z]+[(?<=\d\s]([a-zA-Z]+\s)*[a-zA-Z])+$"
1)Ram Anand           - Working fine
2)Ram                       - Not working
Please can you share the regex code for access the following
both validation
1)Alpha
2)Alpha Alpha
 
Thanks 

Answers (3)