SonataAdminBundle icon indicating copy to clipboard operation
SonataAdminBundle copied to clipboard

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

Open sad270 opened this issue 1 year ago • 0 comments

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

sad270 avatar Aug 29 '24 15:08 sad270