In

Checks if the value exists in a given array

  • return (boolean)

In your code

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

In fields

fields:
  example:
    label: Example field
    type: text
    validate:
      in:
        - A
        - B
        - C