What would be a way to validate the text field as soon as the button is clicked?
Using only JavaScript .
Ex :
If the field is not filled in , and the user clicks the button, it issues an alert and would not let the form be sent and would show which field is blank and missing the fill. p>
<form>
<fieldset>
<legend>Teste</legend>
Informe seu nome: <input tpye="text" size="10">
<p>
<input type="submit" value="Validar">
</fieldset>
</form>