You will need to create a custom routine to add a new Validation function. This will need to be after your two CDN calls and before you have your validation routine.
$.validator.addMethod("minAge", function(value, element, min) {
var today = new Date();
var birthDate = new Date(value);
var age = today.getFullYear() - birthDate.getFullYear();
if (age > min+1) { return true; }
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { age--; }
return age >= min;
}, "You are not old enough!");
The next thing you will need to do is to incorporate this into your existing validation functions. Here is the new method
$("form").validate({
rules: {
dob: {
required: true,
minAge: 13
}
},
messages: {
dob: {
required: "Please enter you date of birth.",
minAge: "You must be at least 13 years old!"
}
}
});
These script blocks were easy to find searching google for jQuery Validate Age
This came from the #1 result
Check for a Minimum Age with jQuery Validation | Pete Mall[
^]