Max

Checks if the value equals or is below the given maximum

  • return (boolean)

In your code

if(v::max(5, 10)) {
  echo 'Yay, valid!';
}

In fields

fields:
  example:
    label: Example field
    type: text
    validate:
      max: 10