0

I'm using jQuery Validation Plugin 1.9.0 (from http://bassistance.de/) In my form I have two select menus. When the value of first is changed the second menu is populating with some data using json. The problems is that when row with no data is selected in second menu validation code doesn't warning about that and the form is proceesed as usual. What to do so validator to check second menu correctly even when is populated via ajax (json) ?

Here is my code

$("#my_form").validate({
    rules: {
        first_menu : 'required',
        second_menu : 'required'
    }
});
koopajah
  • 23,792
  • 9
  • 78
  • 104
user1014152
  • 147
  • 2
  • 6

1 Answers1

0

Unless I'm using an out of date version (which is probably likely), I thought that plugin only validates input elements, not select elements. That is probably the issue here...

Aha, you can use a custom rule for it - see this question.

Community
  • 1
  • 1
Fiona - myaccessible.website
  • 14,481
  • 16
  • 82
  • 117