Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Apr 2, 2014
1 parent e9a6ba2 commit 275e736
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/04. Controllers.md
Expand Up @@ -141,9 +141,9 @@ ZfrRest only supports going back one level in the hierarchy.

## Configuring input filters based on context

Quite often, you need different validation rules depending on the HTTP method. For instance, POST method for creating
a user may require a first name, a last name and a password. However, you want restrict updating (PUT method) to
only password and last name, so that they cannot change their first name.
Quite often, you need different validation rules depending on the HTTP method or things like users's permissions... For
instance, POST method for creating a user may require a first name, a last name and a password. However, you want
restrict updating (PUT method) to only password and last name, so that they cannot change their first name.

Zend Framework 2 input filters offer this feature through so-called validation groups. Validation groups allow to
skip unwanted values and do not return them. ZfrRest allows you to do this through a hook called `configureInputFilter`
Expand Down
2 changes: 1 addition & 1 deletion src/ZfrRest/Mvc/Controller/AbstractRestfulController.php
Expand Up @@ -134,7 +134,7 @@ public function getMethodHandlerManager()
}

/**
* Hook to configure an input filter depending on the method
* Hook to configure an input filter fetched/created by ZfrRest
*
* @param InputFilterInterface $inputFilter
* @return InputFilterInterface
Expand Down

0 comments on commit 275e736

Please sign in to comment.