-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Closed
Description
| if (min <= max) { |
"5" would be greater than "10" here, because they're compared by character, not numeric value.
To reproduce, compare form validation behavior of e.g.
<f:number min="10" max="20" clazz="positive-number-required" />
and
<f:number min="5" max="10" clazz="positive-number-required" />
Originally reported by
danielbeck, imported from: String comparison in JS when numbers are expected
- assignee:
jpochat
- status: Closed
- priority: Minor
- component(s): core
- label(s): 2.528.1-fixed, ux
- resolution: Fixed
- resolved: 2025-09-23T01:48:41+00:00
- votes: 0
- watchers: 2
- imported: 2025-11-24
Raw content of original issue
compares min and max, which are strings.
if (min <= max) { "5" would be greater than "10" here, because they're compared by character, not numeric value.
To reproduce, compare form validation behavior of e.g.
<f:number min="10" max="20" clazz="positive-number-required" />and
<f:number min="5" max="10" clazz="positive-number-required" />