Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/constants/validation

lib/constants/validation

Shared validation constants for authentication and form validation.

Variables

MIN_PASSWORD_LENGTH

const MIN_PASSWORD_LENGTH: 8 = 8


EMAIL_REGEX

const EMAIL_REGEX: RegExp

Functions

validatePasswords()

validatePasswords(password, confirmPassword): void

Validate a password and its confirmation value.

Throws an Error when the password is too short or when the two values do not match. Designed to be called inside a mutationFn so the thrown error surfaces through the form’s error state.

Parameters

password

string

confirmPassword

string

Returns

void

Last updated on