craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.2k stars 617 forks source link

[4.x]: Characters limit double error messages #15173

Open yingban opened 3 weeks ago

yingban commented 3 weeks ago

What happened?

Description

Hi, I created a field with a limit set to 30 characters in the control panel. On entry saved, it happens that I have two error message, depending of the characters' length, event when < 120

I try alsy after disabling all custom modules, and the result was the same.

Steps to reproduce

  1. Create an entry with a field limit 30
  2. Save the entry and check errors message below the field

Expected behavior

I expected to have only one error message.

Actual behavior

I have two error message

Craft CMS version

4.8.0

PHP version

8.1.27

Operating system and version

No response

Database type and version

mariadb 10.4

Image driver and version

No response

Installed plugins and versions

i-just commented 3 weeks ago

Hi, thanks for getting in touch!

Just so I understand correctly, you have an entry which has a field with a character limit of 30 characters. When you edit that entry, add more than 30 characters into that field, and attempt to save the entry, you get two validation messages, one about the limit being 30 characters and one about the limit being 120 characters - is that correct?

What type is that field?

You said you disabled all custom modules, and the result was the same. Did you also disable all the plugins and test?

yingban commented 3 weeks ago

Hi @i-just Yes it is correct, the field is a plain text type, with column type as automatic.

I just disabled all plugins and I got the same issue.

i-just commented 3 weeks ago

Thanks! I’m not able to replicate that on a clean Craft CMS instance. I can add the second validation message via module or plugin, though. Would you be able to send your composer.json, composer.lock files and database export to support@craftcms.com and point to the entry where you see this error triggered?