confirmed
| Category | Cross-field |
| Related | same |
| Bundle size | 202 B |
Validates that the value matches a sibling element named {name}_confirmed.
Usage
vue
<VfText name="password" label="Password" rules="required|confirmed" />
<VfText name="password_confirmed" label="Confirm password" />vue
<template>
<VfText name="password" label="Password" rules="required|confirmed" />
<VfText name="password_confirmed" label="Confirm password" />
</template>ts
{
password: {
type: 'text',
label: 'Password',
rules: 'required|confirmed',
},
password_confirmed: {
type: 'text',
label: 'Confirm password',
},
}Behavior
The confirmation element is looked up automatically by appending _confirmed to the element's own path. This is equivalent to using same explicitly on the confirmation element (same:password).
Error Messages
| Key | Default Message |
|---|---|
rule_confirmed_error | The {attribute} confirmation does not match. |