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
sylius_resource:
resources:
app.book:
driver: doctrine/ormclasses:
#[...]form: Sylius\Bundle\ResourceBundle\Form\Type\DefaultResourceTypevalidation_groups: [sylius] # this cannot be in this level, since `form` is already a scalar value
Trying to define it that way will crash because it won't be able to properly parse the YAML file.
Note that I was trying to define the validation groups, because when following the forms documentation, there's a point where you have to define your service, and it uses the validation groups as an argument:
Trying to pass that %app.book.form.type.validation_groups% crashes for me with error You have requested a non-existent parameter "app.book.form.type.validation_groups". This is why I'm trying to define validation_groups for this specific Form Type (although I'm not sure that's the way to proceed, but I certainly need validations here and it's not working, so I guess it has to do with the validation group nor properly defined).
Sylius docs version: latest
Description
The configuration reference is wrong, since it's specifying a
validation_grups
as an array value of an already defined scalar value, see https://github.com/Sylius/SyliusResourceBundle/blob/1.10/docs/reference.md:Trying to define it that way will crash because it won't be able to properly parse the YAML file.
Note that I was trying to define the validation groups, because when following the forms documentation, there's a point where you have to define your service, and it uses the validation groups as an argument:
Trying to pass that
%app.book.form.type.validation_groups%
crashes for me with errorYou have requested a non-existent parameter "app.book.form.type.validation_groups"
. This is why I'm trying to definevalidation_groups
for this specific Form Type (although I'm not sure that's the way to proceed, but I certainly need validations here and it's not working, so I guess it has to do with the validation group nor properly defined).I've seen there's a way to specify the validation groups per route, but I was more interested in a generic way for the entire resource tbh.
Can these inconsistencies be fixed?
And am I understanding it ok? Do I need to define the validation_groups for the resource?
Edit: I think there's no need at all to define that
validation_groups
argument.The text was updated successfully, but these errors were encountered: