# in

Checks if the value exists in a list of given values

****

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

****

```php
V::in($value, array $in, bool $strict = false): bool
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$value` (required) | `mixed` | – | – |
| `$in` (required) | `array` | – | – |
| `$strict` | `bool` | `false` | – |

## Return type

`bool`

## In your code

```php
if (V::in('A', ['A', 'B', 'C'])) {
  echo 'Yay, valid!';
}
```

## In fields

```yaml
fields:
  example:
    label: Example field
    type: text
    validate:
      in:
        - A
        - B
        - C
```