使用UserManager
我设置密码验证:
userManager.PasswordValidator = new PasswordValidator
{
RequiredLength = 6,
RequireNonLetterOrDigit = true,
RequireDigit = false,
RequireLowercase = true,
RequireUppercase = true,
};
当我通过API拨打电话更改密码时,如果密码无效,我得到的回复是:
{
"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')."
]
}
}
如何设置该空白modelState键属性?