-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
-
2.286 released 30 Mar 2021, 2.289.1
The <f:number> tag should support the 'min' and 'max' properties that <input type="number"> supports.
This will provide a modicum of client-side validation for constrained number fields, and limit the stepper buttons in the configuration UI, giving the user a stronger hint about the range of acceptable values.
Example:
<f:entry field="foo"> <f:number min="10" max="100" /> </f:entry>
Will be rendered into an input tag like:
<input type="number" ...other properties... min="10" max="100">
- links to
Hello Chris, your idea is great. I tried to add "min" and "max" attribute to the "input" element, I found it didn't work. After doing some research, I found that the stepper buttons and "input" element were not wrapped by "form" element.
It seems that if you'd like to do validation to the field, adding "min" and "max" attributes isn't the best solution to do it.