Nested collections and setValidationGroup() #6363
Comments
I'm not really sure, but it seems that the problem originates in prepareValidationGroup(). For me, it worked by just moving the line: Thank you |
The quick change that seems to fix this issue (any feedback is welcomed): ant7@95390fe |
@ant7 can you write a test case for this first? |
@Ocramius I'll try and come back. Thank you |
@Ocramius I've wrote two failing tests to prove the described issues (reverted to the original Form.php, so the tests can pass). See ant7@add3060 Thank you P.S. This is my first test unit, so I may have got it wrong: for both tests I've asserted the contrary of what should be a correct result, so both tests pass to prove the issues. |
I've changed the tests a little: ant7@2492f1f . P.S. I'm not very good at working with Git and I made some mistakes along the way. Sorry for this. |
I came across this issue today myself. I pulled down @ant7's changes and everything now works as expected. |
Solved by #6400 |
CF zendframework#6363 zendframework#6400 - Problème d'hydratation des nested collection sur les form, import d'une correction de Zf 2.3
I have the following setup:
form > fieldset > collection > fieldset > collection > fieldset (planId)
The issue appears when:
Result: an error is thrown
This doesn't happen if I remove the nested collection and pass incomplete data for the first collection.
PlanComparison Form:
PlanComparisonFieldset:
GroupFieldset:
PlanFieldset:
In the controller:
The text was updated successfully, but these errors were encountered: