usePasswordValidation(password, options?)
This React hook validates a password against the current Auth0 password policy
and returns a structured result describing whether the password satisfies each rule.Optionally, it can send the validation results to the global error manager so that
form error components can update automatically.
Parameters
The password to validate.
options?
If
true, validation errors are stored in the global error manager under the password field. Defaults to false.Returns
PasswordValidationResultA PasswordValidationResult object containing:isValid—trueif the password satisfies all configured rules.results— an array of per-rule results withcode,label,status, andisValid.
Supported Screens
signupsignup-passwordreset-password
Example