Problem/Motivation
I have an Number input field - which requires user to enter 1 or greater. If the user enters a 0, the error message reads 'must be greater than 1' which is technically incorrect.
I also set the minimum value to '2" and entered a 1 in the input field. It said 'Must be greater than 2'.
Additionally, I initially reported this in the Webform module (issue #3178783) , and the esteemed Jrockowitz pointed out the message was not from webform validation but from elsewhere. I verified his findings by disabling the clientside_validation module.
I searched this module issues, and did find work under way regarding messages.
Steps to reproduce
Install latest Webform. Install latest clientside_validation.
Create a webform, add an element of Number. in the element settings, set the minimum value to 1. Run the form and enter a 0.
Proposed resolution
I believe the message should read 'Must be greater than 0 '. I think the code should be a formula of '[minimum value]-1' to resolve correctly.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| Annotation 2020-10-24 221900.jpg | 24.53 KB | jshimota01 |
Comments