diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-05-24 14:03:32 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-05-24 14:03:32 -0700 |
commit | e09f37e73b45a58c0a6ebf8ad8b5216c91713f26 (patch) | |
tree | 73fc1435227e418be15480ca9b12d865dcb0f8a2 /src/constants | |
parent | 5afdf9208fd3d7498a2595797e6c9fb5f567fc61 (diff) |
Fix yarn lint issues
Diffstat (limited to 'src/constants')
-rw-r--r-- | src/constants/regex.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/constants/regex.ts b/src/constants/regex.ts index 7de36492..61523203 100644 --- a/src/constants/regex.ts +++ b/src/constants/regex.ts @@ -1,7 +1,8 @@ /** * The email regex has complex constraints compliant with RFC 5322 standards. More details can be found [here](https://emailregex.com/). */ -export const emailRegex: RegExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +export const emailRegex: RegExp = + /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; /** * The password regex has the following constraints @@ -11,7 +12,8 @@ export const emailRegex: RegExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@ * - at least one uppercase letter ([A-Z]) * - at least one special character ([^a-zA-z0-9]) */ -export const passwordRegex: RegExp = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,120}$/; +export const passwordRegex: RegExp = + /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,120}$/; /** * The username regex has the following constraints @@ -33,7 +35,8 @@ export const nameRegex: RegExp = /^[A-Za-z'\-,. ]{2,20}$/; * - min. 2 chars, max. 50 chars on website name * - match alphanumerics, and special characters used in URLs */ -export const websiteRegex: RegExp = /^$|^(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,50}\.[a-zA-Z0-9()]{2,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]{0,35})$/; +export const websiteRegex: RegExp = + /^$|^(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,50}\.[a-zA-Z0-9()]{2,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]{0,35})$/; /** * The website regex has the following constraints |