#17119 closed defect (invalid)
dijit.form.RangeBoundTextBox does not validate range
Reported by: | Frederic Canteloup | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Hello, When using RangeBoundTextBox? as editor in sitepen dgrid, I noticed that the min/max range was not validated upon editing the value. After enquiring I noticed that the rangeCheck method had a bug : it invokes compare(primitive,constraints.min) and compare(primitive,constraints.max) from _FormWidgetMixin.js as opposed to invoking compare(primitive.length,constraints.min) and compare(primitive.length,constraints.max). Applying this fix solved my issue and editor started working as expected.
Thanks again for your wonderful toolkit. Frederic
Change History (3)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 follow-up: 3 Changed 9 years ago by
thanks, I naively thought that RangeBoundTextBox? was for string purposes. Are you saying that there is no equivalent of RangeBoundTextBox? for strings and that I then need to resort to overriding compare when needing to apply range constraints on strings ? Thanks for your help. Frederic
I'm confused by the description. "primitive" by default is type=number and compare compares 2 numbers based on min and max. number.length is undefined. If a widget is using this for nonnumeric values, then there should be a specialized compare method that does the .length value-add.