AbstractTypeValidator
in package
implements
ITypeValidator
Read onlyYes
AbstractYes
Validator for app data.
Validates the data is not null if the model does not allow that, that it is of the correct type and that the value is allowed.
Table of Contents
Interfaces
- ITypeValidator
- Ensures that the given app data is of the model's allowed types and satisfies other constraints of the model.
Properties
Methods
- __construct() : mixed
- validate() : null|TypeViolation|ValueViolation
- validateNonNullValue() : null|TypeViolation|ValueViolation
Properties
$notNullConstraint
private
INotNullConstraint|null
$notNullConstraint
Methods
__construct()
public
__construct(INotNullConstraint|null $notNullConstraint) : mixed
Parameters
- $notNullConstraint : INotNullConstraint|null
validate()
public
validate(mixed $value) : null|TypeViolation|ValueViolation
Parameters
- $value : mixed
Attributes
- #[Override]
Return values
null|TypeViolation|ValueViolationvalidateNonNullValue()
public
abstract validateNonNullValue(object|array<string|int, mixed>|string|float|int|bool $value) : null|TypeViolation|ValueViolation
Parameters
- $value : object|array<string|int, mixed>|string|float|int|bool