diff options
author | Tanmay Bhatia <38436012+tbhatia2299@users.noreply.github.com> | 2020-11-03 12:21:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 15:21:54 -0500 |
commit | 3f4e4085223a26c9cab99f65d72219c0e34294fd (patch) | |
tree | e0d61a5237f40890c68c3fc419a3d56ed144035a /src | |
parent | 52e0eb607e2a42277cf9a288492a4889343798fe (diff) |
Fixed password message and BioRegex (#94)
* Fixed password message and BioRegex
* Restored some of the earlier changes
Diffstat (limited to 'src')
-rw-r--r-- | src/constants/regex.ts | 4 | ||||
-rw-r--r-- | src/screens/onboarding/RegistrationOne.tsx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 4d60d78c..3bebe304 100644 --- a/src/constants/regex.ts +++ b/src/constants/regex.ts @@ -40,7 +40,7 @@ export const websiteRegex: RegExp = /^$|^(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._+ * - max. 150 chars for bio * - match alphanumerics, and special characters used in URLs */ -export const bioRegex: RegExp = /^$|^[A-Za-z'\-,.!@#$%^&*()_:?/ ]{1,150}$/; +export const bioRegex: RegExp = /^$|^[A-Za-z0-9'\-,.!@#$%^&*()_:?/ ]{1,150}$/; /** * The gender regex has the following constraints @@ -55,4 +55,4 @@ export const genderRegex: RegExp = /^$|^[A-Za-z\- ]{2,20}$/; * - accepts 012-345-6789 * */ -export const phoneRegex: RegExp = /(\+[1][0-9]{10})/; +export const phoneRegex: RegExp = /([0-9]{10})/; diff --git a/src/screens/onboarding/RegistrationOne.tsx b/src/screens/onboarding/RegistrationOne.tsx index a901d477..a0bab797 100644 --- a/src/screens/onboarding/RegistrationOne.tsx +++ b/src/screens/onboarding/RegistrationOne.tsx @@ -83,7 +83,7 @@ const RegistrationOne: React.FC<RegistrationOneProps> = ({navigation}) => { fetch(SEND_OTP_ENDPOINT, { method: 'POST', body: JSON.stringify({ - phone_number: form.phone_number, + phone_number: '+1' + form.phone_number, }), }), ); @@ -158,7 +158,7 @@ const RegistrationOne: React.FC<RegistrationOneProps> = ({navigation}) => { blurOnSubmit={false} ref={phoneRef} valid={form.isValidPhone} - invalidWarning={'Please enter a valid US phone number.'} + invalidWarning={'Please enter a valid 10 digit number.'} attemptedSubmit={form.attemptedSubmit} width={280} onSubmitEditing={goToVerification} |