Feature #3092

Support annotation-based validation rules in controller actions

Added by Robert Lemke about 12 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
MVC
Start date:
2009-04-15
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

It should be possible to define additional validation rules for arguments of a controller action by declaring them in an annotation:

/**
 * The foo action
 *
 * @param string $firstArgument This argument contains an email address
 * @param integer $secondArgument This argument contains a number
 * @param F3\Foo\Bar\Model\Baz $thirdArgument This argument is automatically validated by the rules defined in the specified model
 * @return void
 * @validate $firstArgument EmailAddress
 * @validate $secondArgument NumberRange(minimum = 5, maximum = 100)
 */
public function fooAction($firstArgument, $secondArgument, \F3\Foo\Bar\Model\Baz $thirdArgument) {
}


Related issues

Related to TYPO3.Flow - Feature #3153: Support of action based filter rules defined by annotation.New2009-04-22

Actions
#1

Updated by Robert Lemke about 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2159.

Also available in: Atom PDF