Checks if the number of characters in the value equals or is below the given maximum

This validator works like Max but it always checks for string length, even if a numeric value is given. The max validator will check for the value of the number in that case.

In your code

if(v::maxLength('Lorem ipsum dolor sit amet.', 10)) {
  echo 'Yay, valid!';

In fields

    label: Example field
    type: text
      maxLength: 10

Is something missing or incorrect? Edit this page on Github…