Last active
July 18, 2018 21:45
-
-
Save wilnaweb/171becdb6a5b964510830ff91d946105 to your computer and use it in GitHub Desktop.
Pattern HTML5 para CPF e CNPJ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CPF: "\d{3}.\d{3}.\d{3}-\d{2}" | |
CNPJ: "\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}" | |
Telefone: "\([0-9]{2}\)[\s][0-9]{4}-[0-9]{4}" | |
Celular: "\([0-9]{2}\) [0-9]{4,6}-[0-9]{3,4}$" | |
Test: | |
CPF: http://bit.ly/2h7DnvF | |
CNPJ: http://bit.ly/2jv9xlU | |
Telefone: https://bit.ly/2LtZSoU | |
Celular: https://bit.ly/2mtjnDq | |
Example: | |
https://codepen.io/wilnaweb/pen/MEwamB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment