Bug #4168

Rules added with @validate will replace existing validation rules

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

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

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

A @validate annotation placed in an action method's comment should add new validation rules to the existing base validation of an argument.
However, it currently replaces existing rules.

The following code currently leads to disabling validation for the $blog argument which should not be possible by a @validate annotation:

    /**
     * Edits an existing blog
     *
     * @param \F3\Blog\Domain\Model\Blog $blog The blog to be edited. This might also be a clone of the original blog already containing modifications if the edit form has been submitted, contained errors and therefore ended up in this action again.
     * @return string Form for editing the existing blog
     * @validate $blog Raw
     */
    public function editAction(\F3\Blog\Domain\Model\Blog $blog) {
        $this->view->assign('blog', $blog);
    }

Also available in: Atom PDF