0.0.5 • Published 1 year ago

@goodrequest/regex-collections v0.0.5

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

regex-collections

installation

Run npm i @goodrequest/regex-collections

This package contains these regexes

email

emailRegex

password

To check if string has atleast one lowercase, one uppercase, one number and it is atleast 8 characters long, use passwordRegex To also check for special character, use passwordWithSpecialCharRegex If you would like to implement progress bar or tooltip for password, you might want to use these passwordLengthRegex passwordHasUpperCaseRegex passwordHasLowerCaseRegex passwordHasNumberRegex passwordHasSpecialCharRegex

social links

socialLinkIGRegex socialLinkFBRegex

date and time

for format 'YYYY' use yearRegex for format 'YYYY-MM' yearAndMonthRegex for format 'YYYY-MM-DD' dateRegex for format 'HH:mm' timeRegex

utility

These are pretty selfexplanatory

zipCodeSKRegex isWholeNumberRegex isDecimalNumberRegex