mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-14 20:40:59 +02:00
* https://eslint.org/docs/latest/rules/no-undef * https://eslint.org/docs/latest/rules/no-unused-vars
21 lines
711 B
JavaScript
21 lines
711 B
JavaScript
/* global define */
|
|
|
|
// only supports required for the time being
|
|
// TODO: maybe show dojo native error message? i dunno
|
|
define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/MultiSelect", ],
|
|
function(declare, lang, MultiSelect) {
|
|
|
|
return declare('fox.form.ValidationMultiSelect', [MultiSelect], {
|
|
constructor: function(/* params */) {
|
|
this.constraints = {};
|
|
this.baseClass += ' dijitValidationMultiSelect';
|
|
},
|
|
validate: function(/*Boolean isFocused */) {
|
|
if (this.required && this.attr('value').length === 0)
|
|
return false;
|
|
|
|
return true;
|
|
},
|
|
})
|
|
});
|