Skip to content

Kirby 3.7.5

notIn

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

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

Parameters

Name Type Default
$value * mixed
$notIn * mixed

Return type

bool

In your code

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

In fields

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