javascript - Validate function works on ValidationTextBox but not on FilteringSelect. Why? -


i'm having rather strange behaviour , don't know if it's because i'm not doing right.

i trying customize dojo filteringselect in application show invalid messages @ will. looking @ api, found way it. way works fine validationtextbox.

code switch validation state:

var originalvalidator = textbox.validator; textbox.validator = function() {return false;} textbox.validate();   textbox.validator = originalvalidator; 

here's fiddle can take look:

http://jsfiddle.net/phusick/hgbnq/

if change validationtextbox filteringselect, should work same. reason, doesn't! here's fiddle:

http://jsfiddle.net/nachoargentina/hgbnq/421/

any suggestions appreciated!

dijit/form/filteringselect indeed inherit dijit/form/validationtextbox, overrides isvalid (source). isvalid calls validator function in validationtexbox.

you compose own filteringselect uses same method validationtextbox uses isvalid, or whatever wanted or needed use.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -