Min
extends NumericRule
in package
Inclusive lower bound: a numeric value not below the bound passes; any other value fails.
Tags
Table of Contents
Methods
- validate() : bool
- Validate a value against the checked parameter of the rule.
- accepts() : bool
- Whether the measure is accepted under the parameter.
- holds() : bool
- Whether the value holds under the checked parameter.
- measure() : float|null
- The measure of the value, or null for a value without one.
- parameter() : P
- The checked parameter of the rule.
- within() : bool
- Whether the measure lies within the inclusive range.
Methods
validate()
Validate a value against the checked parameter of the rule.
public
final validate(mixed $value, mixed $param, array<string|int, mixed> $allData, FieldPath $path) : bool
Parameters
- $value : mixed
-
The value to validate
- $param : mixed
-
The rule parameter (e.g., min length, pattern, etc.)
- $allData : array<string|int, mixed>
-
All form data (for cross-field validation)
- $path : FieldPath
-
The data path of the value with the positions of its row keys
Tags
Return values
bool —True if valid, false otherwise
accepts()
Whether the measure is accepted under the parameter.
protected
accepts(int|float $measure, mixed $parameter) : bool
Parameters
- $measure : int|float
- $parameter : mixed
Return values
boolholds()
Whether the value holds under the checked parameter.
protected
final holds(mixed $value, P $parameter) : bool
Parameters
- $value : mixed
- $parameter : P
Return values
boolmeasure()
The measure of the value, or null for a value without one.
protected
final measure(mixed $value) : float|null
Parameters
- $value : mixed
Return values
float|nullparameter()
The checked parameter of the rule.
protected
parameter(mixed $param) : P
Parameters
- $param : mixed
Return values
Pwithin()
Whether the measure lies within the inclusive range.
protected
final static within(int|float $measure, array{int|float, int|float} $range) : bool
Parameters
- $measure : int|float
- $range : array{int|float, int|float}
-
the minimum and the maximum