From af8e4bcb1a847d28920a3ef83226bb9fcbe538f9 Mon Sep 17 00:00:00 2001 From: Tanmay Bhatia Date: Wed, 13 Jan 2021 17:40:47 -0800 Subject: Bio can include everything now --- src/constants/regex.ts | 2 +- src/screens/profile/EditProfile.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 6ab045bd..fa35e317 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-z0-9'\-,.!@#$%^&*()_:?/ ]{1,150}$/; +export const bioRegex: RegExp = /^$|[^]{1,150}$/; /** * The gender regex has the following constraints diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx index 55e19a51..ed012313 100644 --- a/src/screens/profile/EditProfile.tsx +++ b/src/screens/profile/EditProfile.tsx @@ -434,7 +434,7 @@ const EditProfile: React.FC = ({route, navigation}) => { valid={form.isValidBio} attemptedSubmit={form.attemptedSubmit} invalidWarning={ - 'Bio must be less than 150 characters and must contain valid characters' + 'Bio must be less than 150 characters' } width={280} value={form.bio} -- cgit v1.2.3-70-g09d2 From 2c80480ba67a4a8315160f18fe10551dbed03f63 Mon Sep 17 00:00:00 2001 From: Tanmay Bhatia Date: Thu, 14 Jan 2021 10:05:56 -0800 Subject: Made a slight change in the bioRegex string --- src/constants/regex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/constants/regex.ts b/src/constants/regex.ts index fa35e317..273d3472 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 = /^$|[^]{1,150}$/; +export const bioRegex: RegExp = /[^]{1,150}$/; /** * The gender regex has the following constraints -- cgit v1.2.3-70-g09d2 From 397fb6b17ed88d631db0b8bd67f877bc14d59d35 Mon Sep 17 00:00:00 2001 From: Tanmay Bhatia Date: Thu, 14 Jan 2021 16:16:53 -0800 Subject: Made the required changes --- src/constants/regex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 273d3472..fe5ce3ab 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 = /[^]{1,150}$/; +export const bioRegex: RegExp = /^[\s\S]{1,150}$/; /** * The gender regex has the following constraints -- cgit v1.2.3-70-g09d2