Validation of form | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Validation of form

I tried validating inputs with JavaScript but the second validation worked while the first validation didn’t work out, what could be the problem? https://code.sololearn.com/W7Xt5h2dTnIS/?ref=app

6th Aug 2019, 10:14 PM
Abass Nurudeen
Abass Nurudeen - avatar
2 Answers
+ 2
You're trying to declare 2 functions with the same name which can't necessarily work when it comes to most languages. What I would suggest doing is just have one function validating both sets of input, as doing so would avoid having the conflicting function names
6th Aug 2019, 10:55 PM
Faisal
Faisal - avatar