javascript - jQuery Validate Plugin Not Submitting Form -


i'm using jquery validation plugin https://jqueryvalidation.org

there nothing special actual form itself, uses default markup really.

the issue have form doesn't submit on valid form , requires me click submit button again. i've tried using submithandler form.submit() too

 <form action="/search/" method="post" id="postcode-search">     <div class="input-wrap">         <input type="input" id="postcode" name="postcode" class="director-search" placeholder="enter postcode here" required><br>         <div class="error-message"></div>     </div>     <button id="submit" type="submit" class="primary"><span class="inner"><i class="fa fa-search"></i> search</span></button> </form> 

and code form validation below

    $('form#postcode-search').validate({         rules: {             postcode: {                 required: true,                 remote: {                     url: theme_location + 'inc/postcode-validation.php',                     type: 'post',                     data: {                         postcode: function() {                             return $('input#postcode').val();                         }                     }                 }             }         },         messages: {             postcode: {                 required: 'please provide full postcode.'             }         }     }); 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -