Form validation in javascript does not work probably
问题 I am working on this form which is suppose to validate the form before submitting $(document).ready(function() { $("#form3").validate(); if ($('#form3').valid()) $('#form3').submit(); }); But the problem is: it prints the (empty fields error) when the form is loaded. UPDATE : the function is now working Horraaay :) with the following code: <script> $(document).ready(function(){ $("#form3").validate(); }); </script> The only problem was the input form name .. I used 'submit' as a name of the