title: How could " possibly be the returned value for a new user
body: <p>I have a form that I am trying to implement that creates a new user in the database. For some reason when it executes the controller function its returning &quot; for the email address and returns me back to the view with a UserManager validation error. But I dont possibly see how it could be returning &quot; when I can see its posting the email from the view.</p>
  <pre><code>    using Microsoft.AspNetCore.Mvc;
      using Microsoft.AspNetCore.Identity;
      using Rabbit.Application.Models;
      using System.Threading.Tasks;
      using Rabbit.Application.Identity.Models;
      
      namespace Rabbit.Application.Identity.Controllers
      {
         
          public class AdminController : Controller
          {
              private UserManager&lt;ApplicationUser&gt; _userManager;
      
              public AdminController(UserManager&lt;ApplicationUser&gt; usrMgr)
              {
                  _userManager = usrMgr;
              }
      
              public IActionResult Index()
              {
                  return View(_userManager.Users);
              }
      
      
              public ViewResult Create() =&gt; View();
      
              [HttpPost]
              public async Task&lt;IActionResult&gt; Create(User input)
              {
                  if (ModelState.IsValid)
                  {
                      var appUser = new ApplicationUser
                      {
                          UserName = input.Name,
                          FirstName = input.FirstName,
                          LastName = input.LastName,
                          Email = input.Email,
      
                      };
      
                      var result = await _userManager.CreateAsync(appUser, input.Password);
                      if (result.Succeeded)
                          return RedirectToAction(&quot;Index&quot;);
                      else
                      {
                          foreach (var error in result.Errors)
                              //if (error.Code == &quot;DuplicateUserName&quot;) continue;
                          ModelState.AddModelError(string.Empty, error.Description);
                      }
                  }
                  return View(input);
              }
          }
      }
  </code></pre>
  <p><strong>View</strong></p>
  <pre><code>@using Rabbit.Application.Models
  @model User
    @section Scripts {
      &lt;partial name=&quot;_ValidationScriptsPartial&quot;/&gt; 
  }
  @{
      ViewData[&quot;Title&quot;] = &quot;Create&quot;;
  }
  &lt;h1 class=&quot;bg-info text-white&quot;&gt;Create User&lt;/h1&gt;
  &lt;a asp-controller=&quot;Admin&quot; asp-action=&quot;Index&quot; class=&quot;btn btn-secondary&quot;&gt;Back&lt;/a&gt;
  &lt;div asp-validation-summary=&quot;All&quot; class=&quot;text-danger&quot;&gt;&lt;/div&gt;
  
  &lt;form asp-controller=&quot;Admin&quot; asp-action=&quot;Create&quot; method=&quot;post&quot;&gt;
  
                    &lt;div class=&quot;form-group&quot;&gt;
                          &lt;div class=&quot;input-group input-group-alternative mb-3&quot;&gt;
                              &lt;div class=&quot;input-group-prepend&quot;&gt;
                                  &lt;span class=&quot;input-group-text&quot;&gt;
                                      &lt;i class=&quot;ni ni-circle-08&quot;&gt;&lt;/i&gt;
                                  &lt;/span&gt;
                              &lt;/div&gt;
                              &lt;input asp-for=&quot;Email&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;Email&quot; autocomplete=&quot;email&quot; /&gt;
  
                          &lt;/div&gt;
                          &lt;span asp-validation-for=&quot;Email&quot; class=&quot;invalid-feedback&quot; style=&quot;display: block&quot;&gt;&lt;/span&gt;
                      &lt;/div&gt;
                   &lt;div class=&quot;form-group&quot;&gt;
                          &lt;div class=&quot;input-group input-group-alternative mb-3&quot;&gt;
                              &lt;div class=&quot;input-group-prepend&quot;&gt;
                                  &lt;span class=&quot;input-group-text&quot;&gt;
                                      &lt;i class=&quot;ni ni-circle-08&quot;&gt;&lt;/i&gt;
                                  &lt;/span&gt;
                              &lt;/div&gt;
                              &lt;input asp-for=&quot;Password&quot; class=&quot;form-control&quot; placeholder=&quot;Password&quot; /&gt;
  
                          &lt;/div&gt;
                          &lt;span asp-validation-for=&quot;Password&quot; class=&quot;invalid-feedback&quot; style=&quot;display: block&quot;&gt;&lt;/span&gt;
                      &lt;/div&gt;
                     
      &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Create&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>