From which validator class are all default validators derived? (1)
Answer
Class ObjectValidator
Class ValidationValidator
Class DefaultValidator
Class AbstractValidator
Class ValidationInterface
Question 3
Question
Given the following code in a domain model, which statements about the validator are correct? (2)
use TYPO3\CMS\Extbase\Annotation\Validate;
/**
* Title
*
* @var string
* @Validate("Vendor\MyExtension\Validation\Validator\ExampleValidator", options={"m\
inimum": 10})
*/
protected $title = '';
Answer
The method validate() of the validator class hast to accept the argument minimum in the
method signatur
The TypoScript configuration persistence.validation.options.minimum = true must be set
The property $supportedOptions is required in the ExampleValidator class
A method named Minimum() is required in the ExampleValidator class
The validator class file should be stored as Classes/Validation/Validator/ExampleValidator.php