[jQuery] Re: Validate textbox (required=true) on combobox selected value

2009-06-26 Thread ciupaz
Perfect, thank you all. Luis

[jQuery] Re: Validate textbox (required=true) on combobox selected value

2009-06-24 Thread Jules
Its in the validate documentation http://docs.jquery.com/Plugins/Validation/Methods/required#dependency-expression In your case rules: { newColor: { required: function(element) { return $("#color").val() == -1; } }

[jQuery] Re: Validate textbox (required=true) on combobox selected value

2009-06-24 Thread fredrik
Don't really understand the Validate Plugin, but you can use this to validate if user selected newcolor or any other: if(parseInt($('#color').val) === -1 && $('#newColor').val().length === 0){ /** user hasn't filled out a new color in #newColor when choose to "Specify new color" **/ }else{