Skip to content

Instantly share code, notes, and snippets.

@JimStencil
Forked from marcoscastro/index.html
Created March 23, 2020 20:59
Show Gist options
  • Save JimStencil/b85d20840179bedbf91a85b369a87fc7 to your computer and use it in GitHub Desktop.
Save JimStencil/b85d20840179bedbf91a85b369a87fc7 to your computer and use it in GitHub Desktop.
HTML 5 - Validando formato de CPF
<html>
<head>
<title>Formato CPF</title>
<script src="script.js"></script>
</head>
<body>
<h3>Digite seu CPF:</h3>
<form name="cadastro">
<input type="text" name="cpf" \
pattern="\d{3}\.\d{3}\.\d{3}-\d{2}" \
title="Digite um CPF no formato: xxx.xxx.xxx-xx">
<input type="submit" value="Verificar">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment