form validations


in my form i have 10 fields .
i know how to validate individually the validations. but i require how to validate either of one.

for example

in my form i hv the fields as firstname,lastname, username,password,email, phonenumber etc

if i want to place anyone of the email or phonenumber
i.e.,i want to enter either email or phonenumber only.

please help me.
thanq in advance

I haven't tried it but I think you could create a custom callback function (see "Callbacks" under "Form Validation" in the User Guide) and then do your tests conditionally, meaning you only test for one of the required values if the other value is missing, otherwise return true or ignore or whatever.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.