How to customize ASP.NET Identity Core Username to allow special characters and space

后端 未结 6 1395
没有蜡笔的小新
没有蜡笔的小新 2020-12-20 18:16

I have changed my Register Action Method to accept user Name instead of Email.

if (ModelState.IsValid)
{
    var user = new ApplicationUser          


        
6条回答
  •  温柔的废话
    2020-12-20 18:39

    UserName should not allow special characters or white spaces, I don't think that there is any website will allow you to do that, you can use FirstName and Last name to get an info like "Joe Smith".

提交回复
热议问题