Skip to content

[5.x]: Plain Text field validation enforces character limit on disabled entries #18718

@martinleveille

Description

@martinleveille

What happened?

Description

When a Plain Text field has a "Field Limit" configured (maximum number of characters or bytes), validation errors are triggered even when the entry is disabled. Disabled entries should not run field-level validation, as they are not active content.

Steps to reproduce

  1. Create a Plain Text field with a "Field Limit" set (e.g., 10 characters).
  2. Create an entry using a section that includes this field.
  3. Fill the field with content that exceeds the configured limit.
  4. Disable the entry.
  5. Save the entry.

Expected behavior

The entry should save successfully without validation errors, since disabled entries are not expected to enforce field-level validation constraints.

Actual behavior

Validation errors are returned for the Plain Text field's character limit, preventing the disabled entry from being saved.

Image

Craft CMS version

5.9.19

PHP version

8.2.30

Operating system and version

Linux 6.12.76-linuxkit

Database type and version

MySQL 8.0.44

Image driver and version

Imagick 3.8.1

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions