Skip to content

[4.0] component config form not saving when validation fails on empty field #34102

@Ruud68

Description

@Ruud68

Steps to reproduce the issue

In order to be able to reproduce this follow the below instruction (otherwise I had to create a component that needed to be installed).

  1. in ./administrator/components/com_content/config.xml add the following field:

<field name="email" type="text" pattern=".*@.*\..*" label="TESTFIELD" description="" />

  1. in the back-end of the j4 site goto articles options
  2. leave the TESTFIELD empty
  3. click [save] button

Expected result

Configuration should save (TESTFIELD is empty and NOT required)

Actual result

save action throws error:

The form cannot be submitted as it's missing required data.
Please correct the marked fields and try again.
screen shot 2021-05-22 at 14 10 06

System information (as much as possible)

J4 dev 8 (nightly)
PHP 8.05
mysql 8.0.25

Additional comments

saving with this field and (empty) value works correct in J3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions