1
I have a character limiter for TEXT only. Now I need the characters to be limited in only 2 (I want to make the user type the state, for example: PR, SP, RJ...). How I do it?
$(document).ready(function () {
$(".apenastexto").keypress(function (event) {
var inputValue = event.which;
if (!(inputValue >= 65 && inputValue <= 233) && (inputValue != 32 && inputValue != 0)) {
event.preventDefault();
}
});
$(".apenastexto").addClass("form-control");
});