[FIXED] [2.3] 2.2 Possible a bug on remote validation

  1. #1

    [FIXED] [2.3] 2.2 Possible a bug on remote validation

    Hi,

    I want to disable remote validation when field readonly, but I find if readonly field got foucs(you can click on it), then type any key use keyboard, the remove validation will invoke.

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void TextField_Validation(object sender, RemoteValidationEventArgs e)
        {
            if (Convert.ToString(e.Value) == "abc")
                e.Success = true;
        }
    </script>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager runat="server"></ext:ResourceManager>
        <ext:Viewport ID="Viewport1" runat="server">
            <Items>
                <ext:TextField ID="TextField1" runat="server" FieldLabel="Name"
                    IsRemoteValidation="true" ReadOnly="true" Text="bcd">
                    <RemoteValidation OnValidation="TextField_Validation">
                    </RemoteValidation>
                </ext:TextField>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    I try to use Before to disabled remote validation like this:

    <RemoteValidation OnValidation="TextField_Validation" Before="return false;">
    </RemoteValidation>
    But, "return false;" only can prevent remote validation call server, the loading icon will appear follow the field yet.

    Then I find this post http://forums.ext.net/showthread.php...idation-on-off

    Any way, it's a solution to disable remote validation, but I prefer the solution use Before="return false;" to use activateRemoteValidation and deactivateRemoteValidation, so do you think it's a bug?
    Last edited by Daniil; Sep 06, 2013 at 3:55 PM. Reason: [FIXED] [2.3]
  2. #2
    Additional, If remote validation invoke, the loading icon will appear, when validation over, the loading icon will disappear, and any IndicatorText will disappear together.

    Run below code, when remote validtion invoke over, the red "*" will disapear.

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void TextField_Validation(object sender, RemoteValidationEventArgs e)
        {
            if (Convert.ToString(e.Value) == "abc")
                e.Success = true;
        }
    </script>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style>
            .red {
                color:red;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server"></ext:ResourceManager>
        <ext:Viewport ID="Viewport1" runat="server">
            <Items>
                <ext:TextField ID="TextField1" runat="server" FieldLabel="Name"
                    IsRemoteValidation="true" IndicatorText="*" IndicatorCls="red">
                    <RemoteValidation OnValidation="TextField_Validation">
                    </RemoteValidation>
                </ext:TextField>
            </Items>
        </ext:Viewport>
    </body>
    </html>
  3. #3
    Thanks for the report, both issues are fixed in SVN
    Vladimir Shcheglov
    Sr. Developer
  4. #4
    Ok, Thanks.

Similar Threads

  1. [CLOSED] Remote Validation questions
    By bogc in forum 2.x Premium Help
    Replies: 5
    Last Post: Mar 06, 2013, 7:07 AM
  2. [OPEN] [#100] Validation - Remote/Client
    By adelaney in forum 2.x Premium Help
    Replies: 7
    Last Post: Dec 29, 2012, 7:12 AM
  3. Remote Validation using RowEditor
    By mait_k in forum 1.x Help
    Replies: 1
    Last Post: Dec 20, 2011, 5:24 PM
  4. Replies: 3
    Last Post: Jul 11, 2011, 10:43 AM
  5. Remote Validation
    By olimpia in forum 1.x Help
    Replies: 0
    Last Post: Jun 12, 2009, 8:39 PM

Tags for this Thread

Posting Permissions