Skip to content

Kirby 4.1.2

same

Checks that the first value equals the second value

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

Parameters

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

Return type

bool

In your code

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

In Panel fields

fields:
  example:
    label: Example field
    type: text
    validate:
      equals: A