Minimum length message is imprecise

Created on 8 January 2024, 11 months ago
Updated 19 April 2024, 7 months ago

Problem/Motivation

The validation error message when using the minimum length setting for an element is imprecise; it says the value "must be longer than", instead of "must be at least".

Example screenshot (please excuse the overly long element name!) :

Configuring a maximum length isn't necessary, but this issue will especially confuse users who have to enter values within both constraints. (e.g. a user enters too many characters and is told one thing, then too few and is then told a potentially-conflicting message).

Steps to reproduce

Configure a webform element using a minimum length. Attempt submitting a value in this element with a value that is shorter than this. The message says the value needs to be longer than the configured length, but a value matching the configured length should be acceptable.

Example configuration screenshot:

Proposed resolution

Adjust the validation message.

Remaining tasks

Provide & review patch

User interface changes

Translatable string change

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

🇬🇧United Kingdom james.williams

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024