accepted
Validates that the value is accepted: 'yes', 'on', '1', 1, true, or 'true'. Typically used for checkboxes that must be checked, like accepting terms.
Usage
vue
<VfCheckbox name="terms" text="I accept the terms" rules="accepted" />vue
<template>
<VfCheckbox name="terms" text="I accept the terms" rules="accepted" />
</template>ts
{
terms: {
type: 'checkbox',
text: 'I accept the terms',
rules: 'accepted',
},
}Error Messages
| Key | Default Message |
|---|---|
rule_accepted_error | The {attribute} must be accepted. |