import type { PasswordValidationResult } from '@auth0/auth0-acul-js'; /** * 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. * * @supportedScreens * - `signup` * - `signup-password` * - `reset-password` * * @param password * - The password to validate. * @param options.includeInErrors * - If `true`, validation errors are stored in the global error manager under the `password` field. Defaults to `false`. * * @returns A {@link PasswordValidationResult} object containing: * - `isValid` — `true` if the password satisfies all configured rules. * - `results` — an array of per-rule results with `code`, `label`, `status`, and `isValid`. * * @example This example shows how to use the hook in a functional component on "signup" screen. * ```tsx * import { usePasswordValidation } from '@auth0/auth0-acul-react/signup'; * const { isValid, results} = usePasswordValidation(password, { includeInErrors: true }); * * if (!isValid) { * console.log(results); * } * ``` */ export declare function usePasswordValidation(password: string, options?: { includeInErrors?: boolean; }): PasswordValidationResult; export { PasswordValidationResult, PasswordComplexityRule } from '@auth0/auth0-acul-js';