> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# usePasswordValidation

```tsx theme={null}
usePasswordValidation(
  password: string,
  options?: { includeInErrors?: boolean },
): PasswordValidationResult
```

<ParamField body="usePasswordValidation" type={<span><a href="/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/PasswordValidationResult">PasswordValidationResult</a></span>}>
  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

  <ParamField body="password" type="string">
    The password to validate.
  </ParamField>

  <ParamField body="options" type="{ includeInErrors?: boolean }">
    Optional configuration for the hook.

    <Expandable title="properties">
      <ParamField body="includeInErrors" type="boolean">
        If `true`, validation errors are stored in the global error manager under the `password` field. Defaults to `false`.
      </ParamField>
    </Expandable>
  </ParamField>

  ## Returns

  [`PasswordValidationResult`](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/PasswordValidationResult)

  A [PasswordValidationResult](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/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`.

  ## Supported Screens

  * `signup`
  * `signup-password`
  * `reset-password`

  ```tsx Example theme={null}
  import { usePasswordValidation } from '@auth0/auth0-acul-react/signup';

  const { isValid, results} = usePasswordValidation(password, { includeInErrors: true });

  if (!isValid) {
    console.log(results);
  }
  ```

  ## Remarks

  * Call `usePasswordValidation` at 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`, or `reset-password` accordingly.
</ParamField>
