PDA

View Full Version : Combo box validator



simon
6 Aug 2009, 6:04 AM
I have Ext.form.ComboBox with forceSelection set to false.

I would like to add, that user can type only positive numbers, the same if i would have number field like:


Ext.form.NumberField({
allowDecimals: false,
allowNegative: false
})


So, how can I add allowDecimals: false AND allowNegative: false to ComboBox?

Thank you for your help,
Simon

steffenk
6 Aug 2009, 6:17 AM
try using the regex option: [0-9]