Skip to content

Commit

Permalink
Merge pull request #1390 from dpfaffenbauer/issue/validation-group
Browse files Browse the repository at this point in the history
[CoreBundle] fix validation groups
  • Loading branch information
dpfaffenbauer authored May 8, 2020
2 parents e294c8c + 24b47a7 commit 32f1aab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('paymentProvider', PaymentProviderChoiceType::class, [
'constraints' => [new Valid(), new NotBlank(['groups' => [$this->validationGroups]])],
'constraints' => [new Valid(), new NotBlank(['groups' => $this->validationGroups])],
'label' => 'coreshop.ui.payment_provider',
'subject' => $options['payment_subject'],
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('acceptTerms', CheckboxType::class, [
'constraints' => [new NotBlank(['groups' => [$this->validationGroups]])],
'constraints' => [new NotBlank(['groups' => $this->validationGroups])],
'label' => 'coreshop.ui.accept_terms',
'mapped' => false,
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
],
'guest' => true,
'constraints' => [
new Valid(['groups' => [$this->validationGroupsGuest]]),
new Valid(['groups' => $this->validationGroupsGuest]),
],
])
->add('address', AddressType::class, [
Expand All @@ -63,7 +63,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'class' => 'cs-address',
],
'constraints' => [
new Valid(['groups' => [$this->validationGroups]]),
new Valid(['groups' => $this->validationGroups]),
],
])

Expand Down

0 comments on commit 32f1aab

Please sign in to comment.