public function validate(FieldDefinition $fieldDefinition, SPIValue $value)
    {
        $validationErrors = [];

        if ($this->internalLinkValidator !== null) {
            $errors = $this->internalLinkValidator->validate($value->xml);
            foreach ($errors as $error) {
                $validationErrors[] = new ValidationError($error);
            }
        }

        return $validationErrors;
    }
public function validate(FieldDefinition $fieldDefinition, SPIValue $value)
    {
        $validationErrors = [];

        if ($this->internalLinkValidator !== null) {
            $errors = $this->internalLinkValidator->validate($value->xml);
            foreach ($errors as $error) {
                $validationErrors[] = new ValidationError($error);
            }
        }

        return $validationErrors;
    }
public function validate ( FieldDefinition $ fieldDefinition , SPIValue $ value ) { $ validationErrors = [ ] ; if ( $ this -> internalLinkValidator !== null ) { $ errors = $ this -> internalLinkValidator -> validate ( $ value -> xml ) ; foreach ( $ errors as $ error ) { $ validationErrors [ ] = new ValidationError ( $ error ) ; } } return $ validationErrors ; }
Validates a field.

@throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

@param \eZ\Publish\API\Repository\Values\ContentType\FieldDefinition $fieldDefinition The field definition of the field
@param \eZ\Publish\Core\FieldType\XmlText\Value $value The field value for which an action is performed

@return \eZ\Publish\SPI\FieldType\ValidationError[]
Validates a field .