PasswordRequirements

A reusable password requirements block that displays validation progress and caps-lock feedback for authentication forms.

Install

Run the following command to install the password requirements block:

npx acc-nuxt add PasswordRequirements

Preview

8 or more characters
Upper & Lowercase letters
At least one number
At least one special character
Within the maximum limit of 30

Usage

The block is designed to be used with a password field. The parent form owns the password validation state and passes the requirement messages and completion state to the block.

Props

requirements:Record<string, string>
Requirement labels keyed by the validation rule identifier.
requirementsValid:Record<string, boolean>
Completion state for each requirement keyed by the same identifier.
inputFocused:boolean
Whether the related password input is focused. Caps-lock feedback is shown only while this is true.

On This Page