I'm doing a validation form using HTML5 and its own tags to validate the fields. I'm using the PATTERN , which limits the character type. But it does not work ... Fields are not being blocked. "Code", only numbers and "Name", only letters.
Code:
<!DOCTYPE html>
<form>
Codigo: <input type="text" required="required" name="number" pattern="[0-9]"></input>
Nome: <input type="text" required="required" name="text" pattern="[a-z]"></input>
</form>
How to solve this?