4.4 Validators

Description

TYPO3 CD 2020 (zweite Auflage) Quiz on 4.4 Validators, created by Pascal Bartl on 09/04/2021.
Pascal Bartl
Quiz by Pascal Bartl, updated more than 1 year ago
Pascal Bartl
Created by Pascal Bartl over 3 years ago
1
0

Resource summary

Question 1

Question
Which of the following validation annotations are valid in principle? (3)
Answer
  • @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)

Question 2

Question
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
Show full summary Hide full summary

Similar

Of Mice and Men
becky_e
C1, C2, C3 keywords
Jessica Phillips
English Literature Key Terms
charlotteoom
CUMULATIVE FREQUENCY DIAGRAMS
Elliot O'Leary
GCSE CHEMISTRY UNIT 2 STRUCTURE AND BONDING
mustafizk
GCSE Science - B1 - You and Your Genes - Genes, Chromosomes and DNA
GeorgeHaines
Crime and Punishment Flashcards - Edexcel GCSE Religious Studies Unit 8
nicolalennon12
GCSE Chemistry C1 (OCR)
Usman Rauf
Mind Maps with GoConqr
croconnor
GCSE AQA Biology 3 Kidneys & Homeostasis
Lilac Potato
Present Simple Vs Present Continuous
Luis Alcaraz