Class

eZ\Publish\Core\FieldType\ValidationError

class ValidationError implements ValidationError

Class for validation errors.

Methods

__construct($singular, $plural = null, array $values = array(), $target = null)

Translation getTranslatableMessage()

Returns a translatable Message.

setTarget(string $target)

Sets the target element on which the error occurred.

string getTarget()

Returns the target element on which the error occurred.

Details

at line 50
public __construct($singular, $plural = null, array $values = array(), $target = null)

Parameters

$singular
$plural
array $values
$target

at line 63
public Translation getTranslatableMessage()

Returns a translatable Message.

Return Value

Translation

at line 79
public setTarget(string $target)

Sets the target element on which the error occurred.

E.g. Property of a Field value which didn't validate against validation. Can be a property path compatible with Symfony PropertyAccess component.

Examples: - "[StringLengthValidator][minStringLength]" => Target is "minStringLength" key under "StringLengthValidator" key (fieldtype validator configuration) - "myfielddefinition_identifier"

Parameters

string $target

at line 84
public string getTarget()

Returns the target element on which the error occurred.

Return Value

string