2022-12-14 00:23:59 -05:00
|
|
|
export const emailRegEx = /^\S+@\S+\.\S+$/;
|
|
|
|
export const phoneRegEx = /^\d+$/;
|
2023-03-18 08:22:42 -05:00
|
|
|
export const phoneInputRegEx = /^\+?[\d-( )]+$/;
|
2022-12-14 00:23:59 -05:00
|
|
|
export const usernameRegEx = /^[A-Z_a-z]\w*$/;
|
|
|
|
export const webRedirectUriProtocolRegEx = /^https?:$/;
|
2023-09-06 11:41:51 -05:00
|
|
|
export const mobileUriSchemeProtocolRegEx = /^[a-z][\d+_a-z-]*(\.[\d+_a-z-]+)+:$/;
|
2022-12-14 00:23:59 -05:00
|
|
|
export const hexColorRegEx = /^#[\da-f]{3}([\da-f]{3})?$/i;
|
|
|
|
export const dateRegex = /^\d{4}(-\d{2}){2}/;
|
2023-01-12 23:37:33 -05:00
|
|
|
export const noSpaceRegEx = /^\S+$/;
|
2024-02-20 00:00:53 -05:00
|
|
|
/** Full domain that consists of at least 3 parts, e.g. foo.bar.com or example-foo.bar.com */
|
|
|
|
export const domainRegEx =
|
|
|
|
/^[\dA-Za-z](?:[\dA-Za-z-]*[\dA-Za-z])?(?:\.[\dA-Za-z](?:[\dA-Za-z-]*[\dA-Za-z])?){2,}$/;
|