Different

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

  • return (boolean)

In your code

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

In fields

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