PDA

View Full Version : How to get a blocking textField maxLenth?



Elfayer
16 Jul 2012, 7:11 AM
Hi,
I would like that while the user is typing his text, he can not type more characters than the maxLengh.


Ext.create('Ext.form.field.Text', {
id: 'textField',
width: 300,
margin: '0 0 10 10',
maxLengh: 10
})

scottmartin
16 Jul 2012, 10:16 AM
Have a look at: enforceMaxLength: true,

Scott.

Elfayer
16 Jul 2012, 11:26 PM
I tried it but didn't write it well.
Ok, my mistake. I wrote "lengh" instead of "length".