CRUDUI PHP API

ContainedIn extends ReferenceRule
in package

Contained In validation rule (CUVR-075).

Validates that a string value occurs in the string value of another field; a value or a referenced value that is not a string fails.

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
Return values
bool
On this page

Search results