Last active
August 4, 2022 06:34
-
-
Save sethdavis512/0e623d164a8f53a948f6baf0df393c0c to your computer and use it in GitHub Desktop.
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
// HTML5 Pattern | |
// http://html5pattern.com/ | |
const alphaNumeric = /[a-zA-Z0-9]+/; | |
const userNameWith20Chars = /^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$/; | |
const twitterHandle = /^[A-Za-z0-9_]{1,15}$/; | |
const password = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$/; // Uppercase, lowercase, and number | |
const password2 = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$/; // Password (UpperCase, LowerCase, Number/SpecialChar and min 8 Chars) | |
// TX NIC | |
const simplePattern = /^[a-zA-Z0-9!?#$@~*(),\-_|':\s]+$/; | |
// Dollar | |
const dollar = /^(?!0\.00)[1-9]\d{0,2}(,\d{3})*(\.\d\d)?$/; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment