Changes between Initial Version and Version 1 of Ticket #14409


Ignore:
Timestamp:
Dec 7, 2011, 11:00:39 PM (9 years ago)
Author:
bill
Comment:

Huh, isn't that the whole point of required:true flag?

Notes on bug system:

  • fill in proper component
  • try to make summary descriptive
  • use triple curly braces to bracket code examples
  • attach test case using the attach file button

Thanks.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14409

    • Property Owner set to Douglas Hays
    • Property Component changed from General to Dijit - Form
    • Property Summary changed from Possible bug in FilteringSelect. to FilteringSelect: required=true does not consider value="" valid
  • Ticket #14409 – Description

    initial v1  
    33So basically,  If i use required:true the FilteringSelect does not consider value="" as an invalid option.  Example.
    44
     5{{{
    56<select id="foo" data-dojo-type="dijit.form.FilteringSelect" data-dojo-props="required:true">
    67<option value="">-Please Select-</option>
    78<option value="valid">valid option</option>
    89</div>
     10}}}
    911
    1012Examination of the isValid() function reveals.
    1113
     14{{{
    1215return this.item || (!this.required && this.get('displayedValue') == ""); // #5974
     16}}}
    1317
    1418this.item is an object --> Object { name="-Please Select-", id="", value=""}
    1519
    16 Since it is likely that this.item will always be an object of that nature... wouldnt this function always return true?
     20Since it is likely that this.item will always be an object of that nature... wouldn't this function always return true?
    1721
    1822