0
People because this condition doesn’t work?? It’s something simple but because I don’t know javascript I’m picking up.
function QTDsenha(){
var senha = document.getElementById('idSenha');
if(senha.value < 6){
alert('Informe uma senha com no mínimo 6 caracteres');
}
}
<output>Senha<output>
<input id="idSenha" onblur="return QTDsenha()">
So if I understood correctly, value is like the string and length is for calculating the size of the string. That’s it?
– Luan Silva
@Luansilva That’s right.
– Sam
function QTDsenha(){
document.getElementById('idSenha').value.length < 6 ? alert('Informe uma senha com no mínimo 6 caracteres') : ''; 
}
– user60252
Do
trim()
in password? This I found strange. Would not like my super secret password "pizza de bacon
" could be broken by someone who knew I like bacon pizza– Jefferson Quesado
How about we continue this discussion in a reply?
– Jefferson Quesado