You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
This should be considered an improvement/feature request.
In the application I am working on we have resources where more then one field is required in the PATCH operation. In the current implementation the content negotiation module matches the validation group with exactly the fields that are passed in the request.
This happens in the validatePatch method in the ContentValidationListener
This is totally okay as a default behavior, but it would be great if we have some way of customizing the validation group for certain special cases by setting a validationGroup for PATCH operations.
Not sure how to do this.
Right now I made an InputFilter class where I redefined the setValidationGroup method to prevent the ContentValidationListener of setting the group like this:
/**
* Don't allow ContentValidationListener::validatePatch to set validation group
*
* @param mixed $group
* @return \Zend\InputFilter\InputFilterInterface
*/
public function setValidationGroup($group)
{
$group = self::VALIDATE_ALL;
return parent::setValidationGroup($group);
}
The text was updated successfully, but these errors were encountered:
This should be considered an improvement/feature request.
In the application I am working on we have resources where more then one field is required in the
PATCH
operation. In the current implementation the content negotiation module matches the validation group with exactly the fields that are passed in the request.This happens in the
validatePatch
method in the ContentValidationListenerThis is totally okay as a default behavior, but it would be great if we have some way of customizing the validation group for certain special cases by setting a validationGroup for
PATCH
operations.Not sure how to do this.
Right now I made an
InputFilter
class where I redefined thesetValidationGroup
method to prevent theContentValidationListener
of setting the group like this:The text was updated successfully, but these errors were encountered: