Issue with Checkbox Validation in FormLayout After Upgrading to JMIX 2.5.0

Hi everyone,

I’m experiencing an issue after upgrading my project to JMIX 2.5.0.
Environment:

IntelliJ IDEA 2024.3.4 (Ultimate Edition)
Build #IU-243.25659.39, built on February 27, 2025
JMIX version 2.5.0
Jmix plugin 2.5.0-243

After the upgrade, the checkbox in formLayout incorrectly displays the requiredMessage when the entity property is false, formLayout incorrectly triggers validation behavior when unchecked.

<checkbox id="isAvailableField" property="isAvailable"/>

Expected Behavior:

• When the checkbox is unchecked, the requiredMessage should not be displayed.
• The user should be able to click the Save button and successfully save the form.

Actual Behavior:

• When the user unchecks the checkbox, the requiredMessage appears.
• The form does not allow saving changes, treating the unchecked state as invalid.

Has anyone else encountered this issue? Is there a workaround or fix for this behavior in JMIX 2.5.0?
Kapture 2025-03-04 at 18.48.16

Hello!

Jmix 2.5.0 includes an updated Vaadin version that supports Checkbox validation and required state. Now, Vaadin Checkbox only passes validation with a value of true. Please refer to the “What’s New” section in the Jmix Documentation, where these changes are listed under “Breaking Changes”:

What’s New :: Jmix Documentations

I suspect that your entity attribute has a @NotNull annotation, which makes the Checkbox required by default. You can try setting required to false programmatically until this issue is resolved.: The required and requiredMessage XML attributes do not update field values · Issue #4087 · jmix-framework/jmix · GitHub

@ViewComponent
private JmixCheckbox isAvailableField;

@Subscribe
public void onInit(final InitEvent event) {
    isAvailableField.setRequiredIndicatorVisible(false);
}
1 Like