相关疑难解决方法(0)

如何在MVC6或AspNet Core或IdentityCore中更改PasswordValidator

在使用Identity的Asp.Net MVC 5中,可以执行以下操作:

 manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength = 6,
                RequireLowercase = true,
                RequireDigit = false,
                RequireUppercase = false
            };
Run Code Online (Sandbox Code Playgroud)

如何在MVC 6中更改相同的配置?

我看到可以在分段中的ConfigurationServices方法中:

 services.AddIdentity<ApplicationUser, IdentityRole>()
         .AddPasswordValidator<>()
Run Code Online (Sandbox Code Playgroud)

但我无法使用.

asp.net-mvc asp.net-identity asp.net-core-mvc asp.net-core

9
推荐指数
1
解决办法
2561
查看次数