[Solved] Hi, I am a newbie in this Javascript. I just wanna ask on how to validate input from a form. Can you check up on my code? [closed]


Problem is here

if ( ver_date.test(z) ){
    alert ("Input the right date format"); //you have used  alert ("Input the right date format") add the semicolem
    return false;

also change onsubmit="return validateForm()" to onsubmit="return validateForm();"

Updated add

var ver_num = '/^ \d{4}-\d{4}-\d{4}-\d{4}$/';
var ver_date="/^([0-9]){2}(\/)([0-9]){4}$/";

3

solved Hi, I am a newbie in this Javascript. I just wanna ask on how to validate input from a form. Can you check up on my code? [closed]