This is a migrated thread and some comments may be shown as answers.

Validation not working on Upload Kendo control

1 Answer 252 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
swarnamala asked on 24 Jul 2014, 08:18 PM
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?

1 Answer, 1 is accepted

Sort by
Dimiter Madjarov
Telerik team
answered on 25 Jul 2014, 10:32 AM
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.

Asked by
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question