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
| Comment | File | Size | Author |
|---|---|---|---|
| webform-minlength-config.png | 12.4 KB | james.williams | |
| webform-minlength-error.png | 56.65 KB | james.williams |
Issue fork webform-3413151
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sourabhjainLet me work on this.
Comment #4
sourabhjainComment #5
james.williamsLooks good to me, thank you! I see the phpunit tests are passing; the validation job fails look to be the same as in HEAD.
Comment #6
james.williamsMy client wanted to make the validation message even clearer, when the max & min are actually the same. So I've adjusted this a little bit more.
Comment #9
jrockowitz commented