Rxova
Skip to content

PasswordRuleState

The evaluated state of one PasswordRule.

id: string;

Stable identifier; also the React key and the data-rule attribute value.

PasswordRule.id


label: string;

Shown in the checklist.

PasswordRule.label


met: boolean;

optional optional?: boolean;

A failing optional rule is advice, not an error: it renders in the checklist but never blocks onValidityChange.

false

PasswordRule.optional


test: (password) => boolean;

Pure predicate. Runs on every keystroke, so keep it cheap.

ParameterType
passwordstring

boolean

PasswordRule.test