Problem/Motivation

I use this module with inline_entity_form and entity_browser.
If I select images once and then delete them the field is empty but I get a Constraint Message (At least one slideshow item must exist.)
Imho we should not put this constraint if the field is not required it should be allowed to be empty.

Proposed resolution

Improve if statement in ItemsCountConstraintValidator

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Insasse created an issue. See original summary.

DiDebru’s picture

RumenDamyanov’s picture

Thank you for the patch. I tested it and it works as intended.

Shenron_segamag’s picture

I can also confirm that the patch works.

Antoniya’s picture

Version: 8.x-2.0-alpha1 » 8.x-2.x-dev
Status: Active » Reviewed & tested by the community

Tested this against core 9.1.7 and media_entity_slideshow 2.4. I'd say it's ready to be committed.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3015310_allow_field_to_be_empty_2.patch, failed testing. View results

Antoniya’s picture

Status: Needs work » Needs review
FileSize
2 KB

Updated the failing test.

Antoniya’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.06 KB

Minor coding standard issue. Triggering the test bot again.