diff options
Diffstat (limited to 'src/constants/regex.ts')
-rw-r--r-- | src/constants/regex.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 38ed03ce..4d60d78c 100644 --- a/src/constants/regex.ts +++ b/src/constants/regex.ts @@ -48,3 +48,11 @@ export const bioRegex: RegExp = /^$|^[A-Za-z'\-,.!@#$%^&*()_:?/ ]{1,150}$/; * - match alphanumerics, hyphens, and whitespaces */ export const genderRegex: RegExp = /^$|^[A-Za-z\- ]{2,20}$/; + +/** + * The phone regex has the following constraints + * - must be 10 digits + * - accepts 012-345-6789 + * + */ +export const phoneRegex: RegExp = /(\+[1][0-9]{10})/; |