# between

Checks for numbers within the given range

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Toolkit/V.php#L292>

****

```php
V::between($value, $min, $max): bool
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$value` (required) | `mixed` | – | – |
| `$min` (required) | `mixed` | – | – |
| `$max` (required) | `mixed` | – | – |

## Return type

`bool`

## In your code

```php
if (V::between($input, 5, 20)) {
  echo 'Yay, valid!';
}
```

## In fields

```yaml
fields:
  example:
    label: Example field
    type: text
    validate:
      between:
        - 5
        - 20
```