本文介绍了AllowOnlyAlphanumericUserNames - 如何设置呢? (RC到RTM重大更改)ASP.NET身份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我设置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身份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!