MaxFrom
extends ReferenceRule
in package
Max From validation rule (CUVR-079).
Validates that a finite number is at or below the value of another field; a missing or null bound declares none.
Table of Contents
Methods
- validate() : bool
- Validate that a value agrees with the value of the field that the parameter names.
- agrees() : bool
- Whether the value agrees with the value of the other field.
Methods
validate()
Validate that a value agrees with the value of the field that the parameter names.
public
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
Return values
bool —True if valid, false otherwise
agrees()
Whether the value agrees with the value of the other field.
protected
agrees(mixed $value, mixed $reference) : bool
Parameters
- $value : mixed
- $reference : mixed