PDA

View Full Version : TextField MaxLength not working



xtremexploit
Jun 11, 2012, 10:39 PM
Hello,

I am setting the max length property in a textfield but it is not working..

here the example:



<ext:TextField ID="startSessionTextField" runat="server" FieldLabel="Account" AllowBlank="false" EnableKeyEvents="true" BlankText="The account is required." Text="XXX" MaxLength="10" AnchorHorizontal="95%" IndicatorIcon="Accept" Regex="^[a-zA-Z0-9]{5,10}$" RegexText="Invalid" />


Is that a bug ?


thanks in advance!

Daniil
Jun 19, 2012, 12:28 AM
Hi,

Please also set up

EnforceMaxLength="true"
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Text-cfg-enforceMaxLength