Skip to content

[5.x]: Omitting a dropdown field's value which has a default doesn't validate #15706

@boboldehampsink

Description

@boboldehampsink

What happened?

Description

Since 5.4, when omitting a field's value which has a default, it doesn't validate anymore. This worked up until 5.3.

Steps to reproduce

  1. Create a dropdown field with a default value
  2. Add to an entry type
  3. Create a new entry (programmatically, we use it in fixtures) that omits setting this field

Expected behavior

Validation should pass, as it should use the default value

Actual behavior

Validation fails

Craft CMS version

5.4.2

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions