CRUDUI PHP API

Email extends StringRule
in package

Email format validation rule.

Table of Contents

Methods

validate()  : bool
Validate that a value is a string that the rule accepts.
accepts()  : bool
Whether the rule accepts the string.

Methods

validate()

Validate that a value is a string that the rule accepts.

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

accepts()

Whether the rule accepts the string.

protected accepts(string $text) : bool
Parameters
$text : string
Return values
bool
On this page

Search results