Validation not working on Upload Kendo control

2 posts, 0 answers
  1. swarnamala
    swarnamala avatar
    2 posts
    Member since:
    Jul 2014

    Posted 24 Jul 2014 Link to this post

    Here is a screen shot of my all. Validation are not working on Kendo Upload control used.

    View has code:

     <div class="col-md-4">
                        @Html.Label("file", "Select File")
                              .Messages(msgs => msgs.Select("Browse"))
                       @Html.ValidationHtmlMessageFor(model => model.UploadFileName)
                    <div class="col-md-4 buttonBox">
                        @Html.Kendo().Button().Name("Save").Content("Upload File").HtmlAttributes(new {type = "submit"}) 

    Code in View Model:

        [Required(ErrorMessageResourceType = typeof(Resources.Resources),
                      ErrorMessageResourceName = "FieldRequired")]
            [Display(Name = "Month")]
            public int ObjectiveMonth { get; set; }

    Controller checks for ModelState.isValid

    But the validation message do not show up

    What could the reason be?

  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2211 posts

    Posted 25 Jul 2014 Link to this post

    Hello Swarnamala,

    The unobtrusive validation is not supported out of the box by the Kendo UI Upload widget. Nevertheless you could use the Kendo UI Validator and define a custom validation rule as demonstrated in the following topic.

    Dimiter Madjarov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top