Using the UserManager
I set password validation:
userManager.PasswordValidator = new PasswordValidator
{
RequiredLength = 6,
RequireNonLetterOrDigit = true,
RequireDigit = false,
RequireLowercase = true,
RequireUppercase = true,
};
When I make a call to change password via an API, the response I get if the password is not valid is:
{
"message": "The request is invalid.",
"modelState": {
"": [
"Passwords must have at least one non letter or digit character. Passwords must have at least one uppercase ('A'-'Z')."
]
}
}
How do I set that blank modelState key property?