Skip to main content
Represents a single evaluated password complexity rule. Returned as part of PasswordValidationResult by usePasswordValidation. Supports hierarchical rule composition via the optional items array.

Properties

string
required
A machine-readable identifier for this complexity rule. Example: "lengthAtLeast", "containsAtLeast".
string
required
A human-readable display name for the rule, suitable for rendering in a password strength indicator.
"valid" | "error"
required
The validation outcome for this rule. "valid" if the rule passed, "error" if it failed.
boolean
required
Boolean representation of the rule outcome. true when status is "valid".
object
Additional parameters used to describe the rule’s threshold or provide context for the error message.
Nested complexity rules for composite rule groups. Allows hierarchical rule composition where a parent rule aggregates multiple child rules.