ZF2-310: Validation group not set when values are bound


The validation group is not set to the input filter when the Form tries to bind data in the function BaseForm::bindValues().

EDIT : in fact, I think it's not a bug. What I was doing was creating a new input filter in my getInputFilter of my models :

public function getInputFilter() { $inputFilter = new InputFilter(); // Init filter...

return $inputFilter;


Whereas I should cache it. However I had a hard time finding that I was wrong, so the doc has to be clear that you have to cache it, otherwise maybe the Form could cache it whenever setInputFilter is called.


If you feel the docs should be updated, please either open a new issue indicating the documentation page to alter, as well as suggested verbiage, or provide a pull request via github.