Zusammenfassung der Ressource
Frage 1
Frage
Which of the following validation annotations are valid in principle? (3)
Antworten
-
@validate NotEmpty, Word(max=3)
-
@validate $blog NotEmpty, Word(max=3)
-
@validate $blog NotEmpty, \Vendor\MyExtension\Validation\Validator\WordValidator(ma\
x=3)
-
@validate $blog NotEmpty, Vendor.MyExtension:Word(max=3)
-
@validate $blog NotEmpty, Vendor.MyExtension:WordValidator(max=3)
Frage 2
Frage
From which validator class are all default validators derived? (1)
Frage 3
Frage
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 = '';
Antworten
-
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