1
I am trying to validate input using required and customizing the error message with oninvalid
however when I fill in the field I tried to submit without filling in, for each character I type it shows the error message, ie the onchange does not change the status of the field.
Would anyone know what that could be?
<input type="text" name="nome" id="nome" placeholder="Nome" required oninvalid="setCustomValidity('Insira o seu nome')" onchange="try{setCustomValidity('')}catch(e){}">