如何在 Microsoft.AspNet.Identity.UserManager 上设置 AllowOnlyAlphanumericUserNames 标志,以便 UserValidator 允许非字母数字用户名?
最佳答案
在 UserManager 构造函数中:
UserValidator = new UserValidator<ApplicationUser>(this) { AllowOnlyAlphanumericUserNames = false };
关于asp.net - AllowOnlyAlphanumericUserNames - 如何设置? (RC 到 RTM 重大更改)ASP.NET Identity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19459591/