+ 1
Which is better validation?
i just want to ask. which is better validation. example checking username. already exists or not. which event, when i type on textfield or when i press button? example form https://code.sololearn.com/WEgEcBiG46vs/?ref=app
2 Answers
+ 1
Can you just explain it a bit more?
If you are asking is checking a username, whether it exists or not a good practice, I mean definitely it is. Most definitely.
This looks more like a registration box, but for log in let's say I would only leave 'username' and 'password'. But yes, checking if it exists is a must. Also, for registration, checking if a username already exists should be done as well. Just a recommendation, since you don't want two users to have the same Username.
I wish you good luck!
0
which do you prefer when checking username,
'button' onclick or 'textfield' onkeyup??