#8266 closed defect (fixed)
FilteringSelect: validates with empty value
Reported by: | coldfire22x | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dijit - Form | Version: | 1.2.3 |
Keywords: | FilteringSelect validate | Cc: | |
Blocked By: | Blocking: |
Description
FilteringSelect? will pass validation if the widget was never interacted with, despite having required set to true and containing an empty display value.
this._isvalid defaults to true and prevents isValid() from detecting this.required==true and this.attr('displayedValue')=="" when the form element is never interacted with. It fails validation if it has been focused and blurred.
Attachments (3)
Change History (9)
Changed 12 years ago by
Attachment: | filteringselect.html added |
---|
comment:1 Changed 12 years ago by
Owner: | set to Douglas Hays |
---|---|
Summary: | FilteringSelect validates with empty value → FilteringSelect: validates with empty value |
comment:2 Changed 12 years ago by
I have this problem too. When are you planning to start working on it?
Changed 12 years ago by
Attachment: | 8266.patch added |
---|
Fixes #8266. _isvalid in FilteringSelect? defaults to false to correctly validate the special case of required=true and a blank/unset initial value. Verified FilteringSelect? robot tests passed in FF3.
comment:3 Changed 12 years ago by
I appended one possible fix. All of the FilteringSelects? will be invalid when the page first loads, but after the server data arrives, the valid ones are marked as valid, and the invalid ones are marked as invalid with valid styling until the user interacts with them.
Changed 12 years ago by
Attachment: | 8266.2.patch added |
---|
Fixes #8266. _isvalid in FilteringSelect? more robustly initialized to handle the case of required=true and an unset value attribute.
comment:4 Changed 12 years ago by
Milestone: | tbd → 1.3 |
---|---|
Status: | new → assigned |
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Demonstration