0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/shared/src/regex.ts
IceHe.xyz 1420bb28ce
feat(core,shared): get /dashboard/users/active (#953)
* feat(core,shared): get /dashboard/users/active

* refactor(core): get /dashboard/users/active

* refactor(core): get /dashboard/users/active

* refactor(core): simplify GET /dashboard/users/active

* refactor(core): simplify dashboardRoutes
2022-05-30 13:51:58 +08:00

8 lines
357 B
TypeScript

export const emailRegEx = /^\S+@\S+\.\S+$/;
export const phoneRegEx = /^\d+$/;
export const usernameRegEx = /^[A-Z_a-z-][\w-]*$/;
export const nameRegEx = /^.+$/;
export const passwordRegEx = /^.{6,}$/;
export const redirectUriRegEx = /^https?:\/\//;
export const hexColorRegEx = /^#[\da-f]{3}([\da-f]{3})?$/i;
export const dateRegex = /^\d{4}(-\d{2}){2}/;