EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on May 21, 2020, 01:39:22 AM



Title: combo always invalid when using setValue()
Post by: devnull on May 21, 2020, 01:39:22 AM
I am using the combo to generate a list of checkboxes, and then using the setValue() method to set the combos selected values, all of that works OK.

But when I validate() or isValid() it always returns false even though the field has a value and meets the criteria of > 1 char:

Code:
$('#ccx').combo({
      validType       : 'minLength[1]',
      required        : true,
      ... lots more code...
});

> $('#ccx').combo('getValue')
< "HAND-ASSEMBLY,MARKETING,PRESSING"

> $('#ccx').combo('isValid')
< false


Title: Re: combo always invalid when using setValue()
Post by: devnull on May 21, 2020, 02:13:47 AM
It appears that validation fails unless you set the text, which I don't really want to do, as the data that gets saved is the item value not the text ?!