Skip to content

Kirby 3.8.4

different

Checks for a value, which does not equal the given value

V::different($value, $other, $strict = false): bool

Parameters

Name Type Default
$value * mixed
$other * mixed
$strict mixed false

Return type

bool

In your code

if(V::different('A', 'B')) {
  echo 'Yay, valid!';
}

In fields

fields:
  example:
    label: Example field
    type: text
    validate:
      different: B