-
Notifications
You must be signed in to change notification settings - Fork 87
BC break introduced in 2.8.4 #102
Comments
What you are saying here is that because nothing was posted for a collection element, you should pass that to the hydrator as an empty array. I have many forms where we don't display the collections on the same page (and thus they are not posted - but should never be deleted like this). How should we work around this? |
@davidwindell can you show example what does not work because I not fully understand where is the problem I thought that inputFitler is responsible for validationGroup but I guess I was wrong :( |
@svycka the idea of the validation group is that if you omit a field (or say a collection) then that data won't be validated or then consequently hydrated. What's happening now is even when a collection is explicitly not included in the validationGroup it is being sent through with the data to the hydrator as empty. I'll push up a breaking test. |
@davidwindell you are right this really does not work with validationGroup, but I am not sure how to fix it yet. |
Please see #103 for a test case that passes in 2.8.3 but not 2.8.4+ |
I'm having the same issue. |
…-of-collections-fix Hotfix for #102 BC break validationGroup ignored for collections
New problem is raised after this fix. I set group validation like this
When I called |
@popovsergiy Could you open separate issue and provide a test, which pass on version <2.9.1 and fails on 2.9.1? Thanks! |
Yes, I'm experiencing this too. |
can someone create a test case for this? @davidwindell ? |
@svycka, I will try create test but not sure what to do after. Simply create PR? |
yep, I would like to see where it fails and maybe we can fix it. |
I've just been embarrassed on live site (yes, test case added now ;) by a BC break that was introduced in 2.8.4.
This was caused by #19.
Because empty array's are now sent to the hydrator for a Collection (even when the collection's key is not in the validationGroup) all values in that collection are being wiped out. This was not the case in 2.8.3.
I'm not sure at the moment what the solution is as I'm still trying to get my head around why #19 was done.
Thoughts please @weierophinney @svycka @bakura10
The text was updated successfully, but these errors were encountered: