before
| Category | Date |
| Related | before_or_equal · after · after_or_equal |
| Bundle size | 417 B |
Validates that the date is before a given date or another element's date. Requires the Date module to be installed.
Usage
vue
<VfText name="birthday" label="Birthday" rules="before:today" />vue
<template>
<VfText name="birthday" label="Birthday" rules="before:today" />
</template>ts
{
birthday: {
type: 'text',
label: 'Birthday',
rules: 'before:today',
},
}Parameters
| Parameter | Description |
|---|---|
date | A date string, the keywords today, tomorrow, yesterday, or another element's path — see Referencing Other Elements. |
Error Messages
| Key | Default Message |
|---|---|
rule_before_error | The {attribute} must be a date before {date}. |