Skip to content
Corex

Min

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

Lower bound on a number: the value must be ≥ N. An empty value passes (see required for emptiness). A form reaches this rule only for a field that is a number — the number or rating type, or any field declaring numeric. SchemaResolver turns min:N on every other field into {@see MinLength}, so 12 in a name is two characters, not the number twelve. An answer that is not numeric is measured by its length. Declare numeric to refuse it.

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

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