如何更改密码验证在ASP.Net MVC 2的身份? [英] How To Change Password Validation in ASP.Net MVC Identity 2?
本文介绍了如何更改密码验证在ASP.Net MVC 2的身份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改密码验证在ASP.Net MVC5身份2?
How To Change Password Validation in ASP.Net MVC5 Identity 2 ?
感谢
推荐答案
在MVC项目模板在VS2013更新2,应该有一个名为 App_Start / IdentityConfig.cs
。在这里面,你应该找到类 ApplicationUserManager
并称为静态工厂方法创建()
。这是在用户管理器类构造,包括密码服务器端验证规则中定义的。例如:
In the MVC project template in VS2013 Update 2, there should be a file called App_Start/IdentityConfig.cs
. In it you should find the class ApplicationUserManager
and a static factory method called Create()
. That's where the user manager class is configured, including the server-side validation rules for passwords are defined. For example:
manager.PasswordValidator = new PasswordValidator
{
RequiredLength = 6,
RequireNonLetterOrDigit = true,
RequireDigit = true,
RequireLowercase = true,
RequireUppercase = true,
};
这篇关于如何更改密码验证在ASP.Net MVC 2的身份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文