abstract class FieldValidator implements ValidationInterface (View source)

Abstract class that can be used as a FieldValidator for FormFields and DBFields

Properties

protected string $name

The name of the field being validated

protected mixed $value

The value to validate

protected bool $allowNull

Whether null is considered a valid value

Methods

public
__construct(string $name, mixed $value)

No description

public
validate()

Validate the value

protected
validateValue()

Inner validation method that performs the actual validation logic

Details

__construct(string $name, mixed $value)

No description

Parameters

string $name
mixed $value

ValidationResult validate()

Validate the value

Return Value

ValidationResult

abstract protected ValidationResult validateValue()

Inner validation method that performs the actual validation logic

Return Value

ValidationResult