PasswordValidationResult
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.
Key Features
- Policy-aware validation — checks the password against the tenant’s configured Auth0 password policy rules.
- Error manager integration — optionally surfaces validation failures to form error components automatically.
Parameters
The password to validate.
Optional configuration for the hook.
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
Remarks
- Call
usePasswordValidationat the top level of your component; do not call it conditionally or inside event handlers. - The import path must match the screen — use
signup,signup-password, orreset-passwordaccordingly.