+ 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

12th Nov 2017, 12:36 AM
Andika Romansyah
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!
12th Nov 2017, 12:50 AM
Ajdin Salihović
Ajdin Salihović - avatar
0
which do you prefer when checking username, 'button' onclick or 'textfield' onkeyup??
12th Nov 2017, 2:53 AM
Andika Romansyah