开发者

jQuery validation is loaded but doesnt display error messages

开发者 https://www.devze.com 2023-04-12 16:26 出处:网络
I have a simple site, which has a form and an inputbox. I want to validate wea开发者_开发百科ther or not this input box is filled, with jQuery validation. The validation plugin is loaded, but i dont g

I have a simple site, which has a form and an inputbox. I want to validate wea开发者_开发百科ther or not this input box is filled, with jQuery validation. The validation plugin is loaded, but i dont get any error messages.

Here is my code:

http://jsfiddle.net/euwPz/

Whats wrong?


you have to include

<script type="text/javascript">
  $(document).ready(function(){
    $("#FormName").validate();
  });
  </script>

this code in your ready function.

this will run the validation .


Please recheck again your link . Because you import only locale file, you also needed to import the plugin file then put this code to your $(document).ready

$("#myForm").validate();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号