AllowOnlyAlphanumericUserNames - 如何设置?(RC 到 RTM 的重大变化)ASP.NET Identity [英] AllowOnlyAlphanumericUserNames - how to set it? (RC to RTM breaking change) ASP.NET Identity

查看:24
本文介绍了AllowOnlyAlphanumericUserNames - 如何设置?(RC 到 RTM 的重大变化)ASP.NET Identity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Microsoft.AspNet.Identity.UserManager 上设置 AllowOnlyAlphanumericUserNames 标志,以便 UserValidator 允许非字母数字用户名?

How do I set the AllowOnlyAlphanumericUserNames flag on Microsoft.AspNet.Identity.UserManager so that UserValidator will allow non-alphanumeric UserName?

推荐答案

在 UserManager 构造函数中:

In UserManager contructor:

UserValidator = new UserValidator<ApplicationUser>(this) { AllowOnlyAlphanumericUserNames = false };

这篇关于AllowOnlyAlphanumericUserNames - 如何设置?(RC 到 RTM 的重大变化)ASP.NET Identity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆