PDA

View Full Version : Combobox: no validation after selecting



skif
4 Apr 2012, 10:06 AM
It seems a Ext JS bug (version 4.07). After selecting value in a combo and typing several characters validation is not executed. The same trouble for Ext.form.field.ComboBox docs (directly insert in Code Editor).

For example try:



Ext.create('Ext.form.ComboBox', {
renderTo: Ext.getBody(),
store : [
'1pt', '2pt', '3pt'
],
editable: true,
regex: /^1pt|2pt|3pt|4pt$/,
});

How to sort out this issue? Thanks.

scottmartin
4 Apr 2012, 12:19 PM
You may want to look at vtypes for live validation. Your solution will check at time of submit.

Regards,
Scott.

skif
4 Apr 2012, 11:50 PM
Thanks Scott.

Also I found a mistake in my regexp. It should be: /^(1pt|2pt|3pt|4pt)$/. It works now.