javascript - Working with livevalidation.js -


i using livevalidation.js (http://livevalidation.com/) validate form.

this works having trouble getting need do.

i have 2 fields "how many children" , "age of children"

basically, need check presence of answer in "age of children" if "how many children" filled out.

if have not filled out "how many children", not matter if "age of children" filled out.

i know how check presence, don't know how check if other field filled out.

any appreciated.

if( numofchildren.presence( 'children here', { failuremessage: "supply come childrens!" } ) == true  && ageofchildren.presence( 'children have ages', { failuremessage: "no children!" } ) == true){  //do work  }  

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -