Bug #7743
closed
FormElement.min = 0 has no effect
Added by Nicola Chiapolini about 5 years ago.
Updated about 5 years ago.
Description
I do have an input field for ECTS points, so I would like to enforce the value in [0, 1, 2, ...)
However even after setting FormElement.min = 0, the "cycle buttons" still go to negative numbers and these are not marked as "error" (A not very useful message BTW) when entered directly. It seems min is considered to be unset when the value is 0.
Choosing digit as Sanitize class enforces positive integers, however it would be nice if the interface suggested correct values only (And the error message there is probably too cryptic for normal users too, I would not show the pattern unless there is a user logged in in the backend.)
- Assignee set to Carsten Rose
- Target version set to 146
- Status changed from New to Closed
- % Done changed from 0 to 100
- "non informative general message 'error'":
New: if no explicit 'data-error' is set in config/form/form-element, the new default is 'Error - allowed values: <min>...<max>' as soon as there is a min or max given.
- "Choosing digit as Sanitize class enforces positive integers, however it would be nice if the interface suggested correct values only"
Done. See above.
- "And the error message there is probably too cryptic for normal users too"
Yes. For QFQ standard pattern a 'human readable' message is now shown.
- "I would not show the pattern unless there is a user logged in in the backend."
Yes: uneccessary information disclosure.
No: this now applies only for 'custom pattern' - a) showing the regexp is cryptic, but better than 'pattern mismatch'. b) The application developer is responsible to provide a specific notification. This can't be solved for custom regexp.
- Target version changed from 146 to 19.1.3
Also available in: Atom
PDF