title: How to take Unicode characters as UserName in ASP.NET Core Mvc?
body: <p>In my ASP.NET Core app I want to take UserName from other language than English but when I try to create an user I got the error </p>
  
  <p><code>"User name 'myUnicodeLang' is invalid, can only contain letters or digits."</code> </p>
  
  <p>How can I allow Unicode characters for my <code>UserManager</code>? I found a question that how to take email as UserName and the solution was.</p>
  
  <pre><code>UserManager.UserValidator = new UserValidator&lt;ApplicationUser&gt;(UserManager) 
  { 
      AllowOnlyAlphanumericUserNames = false 
  };
  </code></pre>
  
  <p>but it's not working in my project it says <code>Using the Generic Type UserManager&lt;TUser&gt; requires 1 type argument</code></p>
  
  <p>#Edit</p>
  
  <p>Controller Constructor</p>
  
  <pre><code>public AuthController(UserManager&lt;SchoolUser&gt; userManager,
          SignInManager&lt;SchoolUser&gt; signInManager)
      {
          _userManager = userManager;
          _signInManager = signInManager;
  
          //Error here
          UserManager.UserValidator = new UserValidator&lt;SchoolUser&gt;
          (userManager) 
           { 
             AllowOnlyAlphanumericUserNames = false };
           }
       }
  </code></pre>