form validations

#1
[eluser]Unknown[/eluser]
hello,

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

#2
[eluser]wabu[/eluser]
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  


Users browsing this thread:
1 Guest(s)


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