ValidateExtensions() not working

Thread is closed for posting
4 posts, 1 answers
  1. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 08 Jul 2010 Link to this post

    Hey,
           I am using a multiple file  upload control in a rad window .
    I have provided the server side validation using the allowedfileextensions property and it working well .
    but my client side validation gives me problem and the ValidateExtensions() function is not working .


    Error that i am getting is upload.ValidateExtensions is not a function.  the js code i used is below


    function ValidateRadUpload1(source, arguments) {
        var upload= $find('<%= FileUpload.ClientID %>');

        arguments.IsValid = upload.ValidateExtensions();
    }

    Ascx.
     <telerik:radupload ID="FileUpload" runat="server" MaxFileInputsCount="5"
                    MaxFileSize="102400000"  ToolTip="Select your File"
                    AllowedFileExtensions=".doc,.xls,.txt,.docx,.xlsx,.rtf,.pdf,.jpg,.bmp"
                    ControlObjectsVisibility="Default"   
                     EnableFileInputSkinning="True"
                     EnableViewState="False">
                </telerik:radupload>
    <asp:customvalidator runat="server" id="CustomValidator1" display="Dynamic"
                clientvalidationfunction="ValidateRadUpload1"
                    onservervalidate="CustomValidator1_ServerValidate" ValidationGroup="upload">
            Invalid extensions.
    </asp:customvalidator>

    Need help.


    Sankardeep V
  2. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 11 Jul 2010 Link to this post

    Any one please help it very urgent.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Jul 2010 Link to this post

    Hello,

    Actually the correct name of the function is: validateExtensions(), note that javascript is case-sensitive.

    Best wishes,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 12 Jul 2010 Link to this post

    OOPssss.
    My bad how did i missed that .
    Any way Thanks YANA its very nice to see you are responding to this type of mistakes.
    Thanks telerik team
Back to Top