0
I am not able to validate a ZIP code typed by the user.
I added the following code within the jquery.validete.js
jQuery.validator.addMethod("cep", function(value, element) {
return this.optional(element) || /^[0-9]{2}.[0-9]{3}-[0-9]{3}$/.test(value);
}, "Por favor, digite um CEP válido");
But if I type: 11.111-111 it accepts, when in fact this zip code does not exist.
Welcome to Sopt Guilherme. Edit your question and group your code using the add code option, I also suggest a tour to learn how to ask: https://answall.com/tour
– gato