web / lib/constants/validation
lib/constants/validation
Shared validation constants for authentication and form validation.
Variables
MIN_PASSWORD_LENGTH
constMIN_PASSWORD_LENGTH:8=8
EMAIL_REGEX
constEMAIL_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