Closed mesaugat closed 7 years ago
anyone ?? @weierophinney @Maks3w @samsonasik
Since this should be fixed once the component is refactored as stateless classes I prefer don't expend time in research the source of this behavior.
However if you or any other find how to fix it I'll merge the propsed fix early.
Reference zendframework/zf2#7645
Same filters are being applied to the data multiple times, if same
InputFilter
instance is used to validate/filter multiple data (array).For instance, the data is an array like this:
The
EmailFilter
used is:So, now I'm trying to validate each of the item of the array using the
EmailFilter
:Running this code will replicate the value of
FilterChain::$filters
for each of these iteration.For the first iteration, the filters applied to data i.e. returned by
FilterChain->getFilters()
would be:In the second iteration, you can see the same filters are being applied for both of the inputs:
email
andid
2 times:In the third iteration, the filters are being applied to the data 3 times:
Is there anything wrong here or is this an issue with the filters?