+ 1

Submit form only if username not already exist Javascript

i have form code i know how to check username already exist or not by comparing with array. But the problem is that my form get submit in both case if my username is valid or not. so how do i make my field not valid and my form do not get submited when i enter the username that already exist in data storage. Check my javascript file in the given code https://code.sololearn.com/WFrHDCpul4SB/?ref=app

11th Aug 2020, 10:48 AM
Saad Saleem
Saad Saleem - avatar
3 odpowiedzi
+ 1
Calviղ thanks
11th Aug 2020, 12:26 PM
Saad Saleem
Saad Saleem - avatar
11th Aug 2020, 10:50 AM
Saad Saleem
Saad Saleem - avatar