Feature #32832

Implement context-specific validation through Validation Groups

Added by Sebastian Kurfuerst over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Validation
Start date:
2011-12-24
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Sometimes, validation should only be executed on persist, sometimes on the controller invocation. Especially when building multi-step forms, one needs to be able to partially validate an object and store the invalid object in the database.

I'd suggest the concept of "Validation Groups" from Symfony: http://symfony.com/doc/current/book/validation.html#validation-groups

Each Validate annotation can get one or multiple validationGroups assigned; the "Default" validation group is used if none is specified.

When validating in the persistence layer, we use "Default" and "Persistence" as validation group; i.e. only validators which have either Default or Persistence assigned as validationGroup get executed.

When being inside a controller invocation, the used validation groups should be configurable; using "Default", "Controller" if none is specified.


Related issues

Related to TYPO3.Flow - Feature #36695: Control Validation Groups and add Groups for Create and UpdateResolved2012-04-28

Actions
#1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7515

#2

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7515

#3

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7515

#4

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7515

#5

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7515

#6

Updated by Sebastian Kurfuerst over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF