Skip to content
Corex

MaxLength

Corex\Forms\Validation\Rules\MaxLength · class · Forms layer

Upper bound on the number of characters, whatever the characters are: 01016999700 is eleven characters, not a number over a thousand million. An empty value passes (see required). Fails with the same key as {@see Max}, so the two share one message.

validate(mixed $value, array $params, array $allValues): ?string

Section titled “validate(mixed $value, array $params, array $allValues): ?string”