Page 1 of 1

form validator question

Posted: Thu Jan 15, 2009 2:57 am
by mit
i m using ;

Code: Select all

var frmvalidator = new Validator("register_form");
frmvalidator.addValidation("name","req","Please enter you name!");
to validate the form , but I have 4 field which are radio button like
1.Gender: Male Female
2.Race: Chinese Indian Others
3...
4...

how can i use this form for these 4 radio button, any ideas?

Re: form validator question

Posted: Thu Jan 15, 2009 3:01 am
by papa
frmvalidator.addValidation("gender","req","Please enter your sex you monkey!");

Don't know what req does, but as the look of it, it sees wether the variable is empty or not and in this case to see if the user has selected anything.

Re: form validator question

Posted: Thu Jan 15, 2009 3:20 am
by mit
no this is not the way