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:
- jquery.validate.js?ver=3.8
- jquery.js?ver=1.10.2
- 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:
- jquery.validate.js?ver=3.8
- jquery.js?ver=1.10.2
- 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 badges1 Answer
Reset to default -1Your 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.