You can use jquery.validator (http://bassistance.de/jquery-plugins/ jquery-plugin-validation/) with a custom validation method on the age field. Here's an example:
//custom validation method $.validator.addMethod("contextualAgeValidation", function(value, element, params) { //see if the first category is selected if( $("#category").val() == 1 ){ //if so, return true if the age is 30 or more, false if not return value >= 30; } return true; }, "Age must be at least 30 if the first category is selected"); Good luck! On Feb 15, 2:29 pm, petergab <adm...@o2.pl> wrote: > 1. I have a form and two fields. One is category and one is age. If first > category is selected the age must be min 30. Is it possible to validate it > with jQuery? > > 2. Second one is similar. I need to set the earliest date in the field > depending on category. > -- > View this message in > context:http://www.nabble.com/field-%28min%2C-max%29-depending-on-other-field... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.