jQuery Live Form Validation in Wordpress

I'm trying to implement the form validation that can be found at: I can get the demo above working, but when I imp

I'm trying to implement the form validation that can be found at: /

I can get the demo above working, but when I implement it on my wordpress site no validation occurs.

The page where it's implemented is here: /

You'll see that the neccesary scripts are included:

  1. jquery.validate.js?ver=3.8
  2. jquery.js?ver=1.10.2
  3. form-validation.css?ver=3.8

as well as the necessary code in the head:

jQuery(function(){
        jQuery("#firstname").validate({
            expression: "if (VAL.match(/^[A-Za-z '-]{3,20}$/) && VAL) return true; else return false;",
            message: "Required."
        });
    });

etc....

As far as I can tell, the form itself is all okay. Still no validation.

I'm trying to implement the form validation that can be found at: http://www.geektantra/2009/09/jquery-live-form-validation/

I can get the demo above working, but when I implement it on my wordpress site no validation occurs.

The page where it's implemented is here: http://www.melbournemeditationcentre/meditation-courses/course-registration/

You'll see that the neccesary scripts are included:

  1. jquery.validate.js?ver=3.8
  2. jquery.js?ver=1.10.2
  3. form-validation.css?ver=3.8

as well as the necessary code in the head:

jQuery(function(){
        jQuery("#firstname").validate({
            expression: "if (VAL.match(/^[A-Za-z '-]{3,20}$/) && VAL) return true; else return false;",
            message: "Required."
        });
    });

etc....

As far as I can tell, the form itself is all okay. Still no validation.

Share Improve this question edited Dec 15, 2013 at 7:16 Subharanjan 1,5891 gold badge17 silver badges29 bronze badges asked Dec 15, 2013 at 5:36 whymattwhymatt 133 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

Your page through javascript errors. Try loading the validation scripts on footer (before closing </body> tag) rather than within header (within <head> tag).

If that doesn't work, then try editing the jquery.validate.js file, and replace the first line (function(jQuery){ with (function($){. It should work.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745657778a4638647.html

相关推荐

  • jQuery Live Form Validation in Wordpress

    I'm trying to implement the form validation that can be found at: I can get the demo above working, but when I imp

    22天前
    80

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信