CRUDUI PHP API

EndDate extends ReferenceRule
in package

End Date validation rule.

Validates that an end date is greater than or equal to a start date field.

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.
parseDate()  : int|null
Parse a date value to timestamp.

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
Return values
bool

parseDate()

Parse a date value to timestamp.

private parseDate(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null
On this page

Search results