diff options
author | George Rusu <56009869+grusu6928@users.noreply.github.com> | 2020-10-27 12:13:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 15:13:13 -0400 |
commit | 9c7a867c1851914322a4b60f20223ae06a31c661 (patch) | |
tree | 7e8a70b2c5e5654240362146d76727991fd1ca97 /src/constants/regex.ts | |
parent | e7a712038a17a759d09bf80c6945c89e060f7310 (diff) |
[TMA263] Added Phone Verification UI (#74)
* [TMA263] Added Phone Verification UI
* include email field
Co-authored-by: george <grus6928@gmail.com>
Co-authored-by: hsalhab <husam_salhab@brown.edu>
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})/; |