Looking at the source code of UserValidator for that verison (v2.2.1), the following method was being called in side of the UserManager.CreateAsync.
// make sure email is not empty, valid, and unique private async Task ValidateEmailAsync(TUser user, List<string> errors) { var email = await Manager.GetEmailStore().GetEmailAsync(user).WithCurrentCulture(); if (string.IsNullOrWhiteSpace(email)) { errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email")); return; } try { var m = new MailAddress(email); } catch (FormatException) { errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.InvalidEmail, email)); return; } var owner = await Manager.FindByEmailAsync(email).WithCurrentCulture(); if (owner != null && !EqualityComparer<TKey>.Default.Equals(owner.Id, user.Id)) { errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.DuplicateEmail, email)); } }
As you can see it is trying to create a MailAddress object using the email address provided. If the address is not in a valid format it should fail.
Given what ever format they used I created a unit test to verify the examples you provided.
[DataDrivenTestMethod] [DataRow("example")] [DataRow("example@example.")] [DataRow("example@exam ple.com")] [DataRow("example@example")] public void ValidateEmailAddress(string email) { var m = new System.Net.Mail.MailAddress(email); Assert.IsNotNull(m); }
The following results were returned
Result Message: Assert.IsTrue failed. DataRow: email: example Summary: Exception has been thrown by the target of an invocation. DataRow: email: example@exam ple.com Summary: Exception has been thrown by the target of an invocation.
example and example@exam ple.com are not considered valid email address according to their logic.
I would suggest you try to perform you own email validation on the model before creating a new user
UserRegisterJson? None of this can be extracted from your question so there isn't much to go on to help you.