For years I was jQuery.validate using version 1.9.0 successfully
Now, with v 1.19.2 I get "jquery.format is not a function".
In my head section:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/jquery.validate.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/additional-methods.min.js" ></script>
html form input
<div class="divTableCell L3"><input name="email" type="text" class="required" id="email" /></div>
At bottom:
<script>
formVerif();
</script>
This is a part of the function used:
function formVerif(){
$(document).ready(function(){
$("#formulario").validate({
errorClass: 'rojo' ,
messages: {
nombre: {
required: "<br />Falta ingresar un nombre.",
minlength: jQuery.format("<br />Ingresa al menos {0} caracteres"),
maxlength: jQuery.format("<br />Ingresa como máximo {0} caracteres"),
alphanumeric: "<br />Ingresa solo letras y espacios"
},
apellido: {
...
...
If I go back to V 1.9.0 no errors are displayed:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="JS/jquery.validate.min.js"></script>
<script src="JS/additional-methods.min.js"></script>
jQuery.format- it should bejQuery.validator.format. Your example code is also incomplete. You only show us the HTML for the field withname="email"and then show the.validate()method with completely different fields.