In my model I have the following:
[Required(ErrorMessage = "First name is required.")]
[Display(Name = "First Name")]
[MaxLength(50)]
[RegularExpression(@"/^[A-z]+$/", ErrorMessage = "Only alphabet characters are allowed.")]
public string FirstName { get; set; }
In the form it's failing the check no matter what I put in there. I want it to just make sure there are only letters, no numbers or special characters.
This is not a duplicate because the referenced post has nothing to do with data annotations. They're two different contexts.