I am trying to validate the password. I am using Data Annotations in my ViewModels like below:
[RegularExpression("^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[@$!%*#?&])[A-Za-z[0-9]@$!%*#?&]{8,}$",ErrorMessage="Password must contain atleast 1 number, 1 letter, and 1 special character.")]
When I try to register with the right format, it still gives me the error message.
Can someone please look at it and help me out?