Match

Checks if the value matches a given regular expression

  • return (boolean)

In your code

if(v::match($value, '/[a-z0-9]+/')) {
  echo 'Yay, valid!';
}

In fields

fields:
  example:
    label: Example field
    type: text
    validate:
      match: "/[a-z0-9]+/"