between
Validates that the value's size is between a minimum and maximum (inclusive).
Usage
vue
<VfText name="age" label="Age" rules="numeric|between:18,65" />vue
<template>
<VfText name="age" label="Age" rules="numeric|between:18,65" />
</template>ts
{
age: {
type: 'text',
label: 'Age',
rules: 'numeric|between:18,65',
},
}Parameters
| Parameter | Description |
|---|---|
min | The minimum size. |
max | The maximum size. |
Behavior
How size is measured depends on the element type:
- String — the character count
- Numeric — the numeric value itself
- Array — the number of items
- File — the file size in kilobytes
Error Messages
| Key | Default Message |
|---|---|
rule_between_string_error | The {attribute} must be between {min} and {max} characters. |
rule_between_numeric_error | The {attribute} must be between {min} and {max}. |
rule_between_array_error | The {attribute} must have between {min} and {max} items. |
rule_between_file_error | The {attribute} must be between {min} and {max} kilobytes. |