From f1300739189283929cb20a22e5281388d1bbeafc Mon Sep 17 00:00:00 2001 From: meganhong <34787696+meganhong@users.noreply.github.com> Date: Tue, 21 Jul 2020 09:51:47 -0700 Subject: Tma119: Split Registration Screen (#23) * split registration screen * styling * changed 4:2 to 3:3 * fade wizard with keyboard visibility * added regex for first and last name * accidentally saved videos in this folder * shortened fade duration to 300ms * add fade to Registration2 * rename RegistrationOne and RegistrationTwo * moved keyboard logic into RegistrationWizard * moved loading indicator out of the way * moving loading to outside of keyboard avoiding view * moved loading indicator up Co-authored-by: Megan Hong --- src/constants/regex.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/constants') diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 350cb855..40c82691 100644 --- a/src/constants/regex.ts +++ b/src/constants/regex.ts @@ -19,3 +19,10 @@ export const passwordRegex: RegExp = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA * - match only alphanumerics, underscores, and periods */ export const usernameRegex: RegExp = /^[a-zA-Z0-9_.]{6,30}$/; + +/** + * The name regex has the following constraints + * - min. 2 chars, max. 20 chars ({2,20}) + * - match alphanumerics, apostrophes, commas, periods, dashes, and spaces + */ +export const nameRegex: RegExp = /^[A-Za-z'\-,. ]{2,20}$/; -- cgit v1.2.3-70-g09d2