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 [email protected] is already taken. Email [email protected] is already taken. It should show only one statement either email or name.

2
  • 2
    Welcome to SO. Why don't you post your code? Commented May 15, 2020 at 5:33
  • can you follow the link and let me know if it works Commented May 15, 2020 at 5:33

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.