I have a validation problem on the client-side in case I am trying to validate the CEP field, I need it to only accept the person's 9 zip code numbers and the -
who can help thank you right away.
This is part of the code:
if(isNaN(cep) || tc.length<10){
alert('digite seu cep corretamente');
document.form.cep.style.background='red';
return false;
}
This code is conflicting with my need because I put it to accept only numbers with isNaN
and I do not know how to accept numbers and only a special character.