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
Right now most of the validation is configured with group sylius.
A quick search through the files of Sylius 1.6.4 reveals 182 constraints configured with sylius group and only 6 constraints with other groups: sylius_customer_guest, sylius_promotion_coupon, sylius_review, sylius_customer_profile
This makes validation customization very cumbersome, because if a constraint need to be removed/replaced, then the sylius group can't be used anymore, so all other constraint aren't applied and have to be copy/pasted with a new group.
Replacing sylius group with more specific groups, like the 4 example above, will improve the developer experience while customizing validation.
This a draft, looking forward to get some feedback on this matter.
The text was updated successfully, but these errors were encountered:
Currently also having issues that would be way easier to solve if there were specific validation groups.
Issue comparable to this one.
The user wants to change a constraint on the product translation.
In creation form, you are using sylius_product form type and it uses validation groups of products. This would work if you edit translation directly through sylius.controller.product_translation:updateAction. So you need to configure validation_group per form, not per entity really.
It appears that the form will use the validation group of the parent. Just changing the child validation group won't disable that. Disabling the parent validation group (sylius), would mean all constraints are removed on the entire parent form.
Right now most of the validation is configured with group
sylius
.A quick search through the files of Sylius 1.6.4 reveals 182 constraints configured with
sylius
group and only 6 constraints with other groups:sylius_customer_guest
,sylius_promotion_coupon
,sylius_review
,sylius_customer_profile
This makes validation customization very cumbersome, because if a constraint need to be removed/replaced, then the
sylius
group can't be used anymore, so all other constraint aren't applied and have to be copy/pasted with a new group.Replacing
sylius
group with more specific groups, like the 4 example above, will improve the developer experience while customizing validation.This a draft, looking forward to get some feedback on this matter.
The text was updated successfully, but these errors were encountered: