0

I am using ASP.NET Identity and want to check only if username already exists. But it check email as well and gives error for both (Email and Username). I want to check only Username. How i can do it. Below is the error. Name customer@test.com is already taken. Email customer@test.com is already taken. It should show only one statement either email or name.

1 Answers1

0

You can use JavaScript to validate on lose focus of the username field. Here is an easy example for reference https://www.codeproject.com/Tips/1104856/Validate-Email-ID-in-ASP-NET-TextBox-using-JavaScr

Praveen Kumar
  • 113
  • 3
  • 11
  • Thank you for your reply. I am using Identity and it is functionality of Identity to avoid duplication user name / email. I want to use that but only for username not email. – Mohammad Adnan May 15 '20 at 05:52