Upload Validation not working

2 posts, 0 answers
  1. Michael Hurse
    Michael Hurse avatar
    20 posts
    Member since:
    Jun 2008

    Posted 15 Nov 2016 Link to this post


    I have an upload control that the validation is not working on.  I am setting it to restrict to .jpg only and 2mb but the save action is called no matter what I upload to it.

        .Events(e => e.Success("onParent1UploadSuccess"))
        .Async(a => a
            .Save("SaveParent1", "HistoryForm", new { AdmissionPK = Model.AdmissionPK })
        .Validation(v => v
            .AllowedExtensions(new string[] { ".jpg" })
        .Messages(m => m.Select("Select File..."))


    How do I get the validation to actually work?


  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2213 posts

    Posted 16 Nov 2016 Link to this post

    Hello Michael,

    The provided configuration is correct and is working as expected on our end. If the problem is still persisting, could you send small isolated runnable example, in which it is reproducing (only the Upload widget View and the save action will be sufficient), so we could inspect it locally and provide assistance?

    I am looking forward to hearing from you.

    Dimiter Madjarov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top