[CLOSED] AllowBlank validation behavior

  1. #1

    [CLOSED] AllowBlank validation behavior

    Hi,

    I've noticed that an input control with its AllowBlank attribute set to "false" shrinks to the left when validated making room for the exclamation sign icon. Is this behavior the new default and is there any way to keep the control size more predictable and static? Please refer to the screen capture below.

    <ext:TextArea ID="TextArea1" runat="server" FieldLabel="Message" EnableKeyEvents="true"
         AllowBlank="false" AutoScroll="true" MsgTarget="Side" >
    </ext:TextArea>
    Click image for larger version. 

Name:	25-09-2015 8-32-58 AM.png 
Views:	45 
Size:	3.2 KB 
ID:	24246
    Last edited by Daniil; Sep 26, 2015 at 8:22 AM. Reason: [CLOSED]
  2. #2
    Hi Vadym,

    It is not reproducible if just put a TextArea on the page. Most likely it depends on a layout. Please provide a full test case.

    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:TextArea
                runat="server"
                FieldLabel="Message"
                AllowBlank="false"
                MsgTarget="Side" />
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil, below is the test case. Set the focus on the TextArea by placing the cursor inside, then click somewhere outside of it to reproduce the issue. I'm testing it with IE11.

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
                <Items>
                    <ext:FormPanel
                        ID="FormPanel1"
                        runat="server">
                        <Items>
                            <ext:TextArea runat="server" FieldLabel="TextArea" AllowBlank="false" MsgTarget="Side" Width="500" />
                        </Items>
                        <TopBar>
                            <ext:Toolbar runat="server">
                                <Items>
                                    <ext:Button runat="server" Text="Reset" OnClientClick="App.FormPanel1.reset();"></ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                    </ext:FormPanel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
  4. #4
    Thank you.

    Found this option.
    http://docs.sencha.com/extjs/5.1/5.1...-autoFitErrors

    So, setting AutoFitErrors="true" appears to produce the required behavior.
  5. #5
    Thanks for digging this out, Daniil! It seems to be doing what's required when set to "false", i.e. control's width doesn't adjust. Please close this thread.

Similar Threads

  1. [0.8.2] "Validator" property vs. AllowBlank
    By Thinjon100 in forum Bugs
    Replies: 1
    Last Post: Oct 30, 2015, 7:23 AM
  2. Replies: 1
    Last Post: Apr 16, 2013, 1:04 PM
  3. Replies: 3
    Last Post: Jun 27, 2012, 2:19 PM
  4. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM
  5. Tab and AllowBlank
    By snippher in forum Bugs
    Replies: 0
    Last Post: Mar 20, 2009, 10:12 AM

Tags for this Thread

Posting Permissions