View Full Version : Don't want TextField AllowBlank to display validation error on initial page load

Jul 02, 2008, 4:59 PM
<ext:TextField ID="txtUsername" runat="server" MaxLength="64" Width="200px" AllowBlank="false"
BlankText="Username is required." MaxLengthText="Username can not exceed 64 characters.">

When the page loads, the textbox is already in an invalid state because there are no text in it. However, from ExtJS's demo page, their textbox only shows the validation error after it looses focus. Is there a property I can set to mimic that behavior? I only want the textbox to be validated when it looses focus or if a login button on the form is clicked.

Jul 02, 2008, 6:35 PM

I've encountered a similar issue in 0.5.3. Would this be because we do not have a FormPanel?


Jul 05, 2008, 4:42 AM
As noted in the Bugs Forum (http://forums.ext.net/showthread.php?threadid=837-5-1.aspx), this bug has been fixed.

Code will be available with the v0.6 release or now via SVN.

Hope this helps.

Jun 27, 2012, 3:19 PM
To resolve this issue you need to set in your code behind as follows: