Is someone able to solve this error? is with jquery validation 1.13.1 and jquery 1.11.1 :
uncaught exception: $.format has been deprecated. Please use $.validator.format instead.
Whenever I disable any validation form I have ,it still show the error, so it's basically something on the validation file code isn't it? not in my form validation file where I use it like this:
$("#free_validation").add("#validation-form").validate({
ignore:'',
rules: {
title:{
required: true,
minlength: 2,
alphanumericwithpunc: true
}
},
messages: {
title: {
required: "Escriba el titulo",
minlength: "Al menos 2 caracteres",
alphanumericwithpunc: "Sólo alfanumérico"
}
}
});
And my method like:
$.validator.addMethod("alphanumericwithpunc", function(value, element) {
return this.optional(element) || /^[\wàáâäãåèéêëìíîïòóôöõøùúûüÿýñçčšžÀÁÂÄÃÅÈÉÊËÌÍÎÏÒÓÔÖÕØÙÚÛÜŸÝÑßÇŒÆČŠŽ∂ð,;.:'\\\_\-\¿?¡!&%$€#()\s]+$/i.test(value);
}, "Letters, numbers, and basic punctuation only please");
as they specified in their documentation :
Any help much appreciated!
The problem was my method, so i used like this now:
$.validator.addMethod("alphanumericwithpunc", function(value, element) {
return this.optional(element) || /^[\wàáâäãåèéêëìíîïòóôöõøùúûüÿýñçčšžÀÁÂÄÃÅÈÉÊËÌÍÎÏÒÓÔÖÕØÙÚÛÜŸÝÑßÇŒÆČŠŽ∂ð,;.:'\\\_\-\¿?¡!&%$€#()\s]+$/i.test(value);
}, jQuery.validator.format("Please enter the correct value"));
alphanumericwithpunc, and I'm guessing that's where the problem is. I see no issues if I get rid of that bit. See my example here.