# notIn

Checks that the given value is not in the given list of values

****

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

****

```php
V::notIn($value, $notIn): bool
```

## Parameters

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

## Return type

`bool`

## In your code

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

## In fields

```yaml
fields:
  example:
    label: Example field
    type: text
    validate:
      notIn:
        - B
        - C
        - D
```