- 
                Notifications
    You must be signed in to change notification settings 
- Fork 470
Open
Labels
Description
Hi.
Thank you very much for your plugin, it is amazing.
I am having an issue while I am trying to validate some fields programatically.
In essential: I have a form that ends with a validate button, I'd like to program a web form which checks some fields passed with an array of Ids like array = ['#myId1', '#myId2']
i have this code:
$('#validate-button').on('click', function () {
   for (var j = 0; j < array.length; j++) {
       var input_id = array[j];
       $(input_id).validate(function(valid, elem) {
          if (valid) {
              console.log('It looks valid');                                 
         } else {
              console.log('It is Invalid');
         }
    });  
});
However it is not sending anything to the console.
Curiously if i put the funciton .validate(... outside of the button click, it works, but not when it is inside.
Have I missed anything?
Thanks