Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(form): Error messages displayed twice with form type "sonata_type_native_collection" or "sonata_type_immutable_array" when "error_bubbling" sets to false #8208

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from

Conversation

sad270
Copy link
Contributor

@sad270 sad270 commented Aug 29, 2024

Subject

fix error messages displayed twice with form type "sonata_type_native_collection" or "sonata_type_immutable_array" when "error_bubbling" sets to false

I am targeting this branch, because it's a fix.

Closes #2761

Step To Reproduce

  • Add an array property on an entity
  • Add Count constraints with min=2
  • On the Admin of this entity add Sonata\AdminBundle\Form\Type\CollectionType or Sonata\Form\Type\ImmutableArrayType field targeting this new property.
  • Add 'error_bubbling' => false form option on this field
  • Go to the creation form of this entity and try to submit.

Screenshot

Screenshot 2024-08-29 at 16 37 40

Changelog

### Fixed
- Error messages displayed twice with form type `sonata_type_native_collection` or `sonata_type_immutable_array` when `error_bubbling` sets to `false` #2761

…_native_collection" or "sonata_type_immutable_array" when "error_bubbling" sets to false

fix sonata-project#2761
@VincentLanglet
Copy link
Member

HI @sad270 thanks for the PR

Where does come from the other error displayed ?
I mean are we sure we won't have error which are never displayed after this change ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants