EasyUI Forum
September 14, 2025, 11:15:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: combo always invalid when using setValue()  (Read 5149 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« 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
Logged

-- Licensed User --
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #1 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 ?!
Logged

-- Licensed User --
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!