CRUDUI PHP API

NotEqual
in package
implements RuleInterface

Not Equal validation rule.

Validates that a value is different from a specified value or another field's value.

Table of Contents

Interfaces

RuleInterface
Interface for validation rules.

Methods

validate()  : bool
Validate that a value is different from the specified value or field.

Methods

validate()

Validate that a value is different from the specified value or field.

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

On this page

Search results