SyntaxFix
Write A Post
Hire A Developer
Questions
This can replace the MaxLength and the MinLength
[StringLength(40, MinimumLength = 10 , ErrorMessage = "Password cannot be longer than 40 characters and less than 10 characters")]