ConstraintDecoratingValidator

final readonly class \TYPO3\CMS\Extbase\Validation\Validator\ConstraintDecoratingValidator

Implements
ValidatorInterface

Validator that decorates a Symfony Constraint.

Attributes

#[Exclude]

Table of Contents

Interfaces

ValidatorInterface
Contract for a validator

Methods

__construct()  : mixed
getOptions()  : array
Returns the options of this validator which can be specified by setOptions().
getRequest()  : ServerRequestInterface|null
Returns the request object of the validator.
setOptions()  : void
Receive validator options from framework.
setRequest()  : void
Sets the request object to the validator.
validate()  : Result
Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.

Methods

__construct()

public __construct(Constraint $constraint) : mixed

Parameters

$constraint : Constraint

getOptions()

Returns the options of this validator which can be specified by setOptions().

public getOptions() : array

Return values

array

getRequest()

Returns the request object of the validator.

public getRequest() : ServerRequestInterface|null

Return values

ServerRequestInterface|null

setOptions()

Receive validator options from framework.

public setOptions(array $options) : void

Parameters

$options : array

setRequest()

Sets the request object to the validator.

public setRequest(ServerRequestInterface|null $request) : void

Parameters

$request : ServerRequestInterface|null

validate()

Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.

public validate(mixed $value) : Result

Parameters

$value : mixed

The value that should be validated

Return values

Result
On this page