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")
@(Html.Kendo().Upload()
.Name("upload")
.Multiple(false)
.Messages(msgs => msgs.Select("Browse"))
)
@Html.ValidationHtmlMessageFor(model => model.UploadFileName)
</div>
<div class="col-md-4 buttonBox">
@Html.Kendo().Button().Name("Save").Content("Upload File").HtmlAttributes(new {type = "submit"})
Controller checks for ModelState.isValid
But the validation message do not show up
What could the reason be?
View has code:
<div class="col-md-4">
@Html.Label("file", "Select File")
@(Html.Kendo().Upload()
.Name("upload")
.Multiple(false)
.Messages(msgs => msgs.Select("Browse"))
)
@Html.ValidationHtmlMessageFor(model => model.UploadFileName)
</div>
<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?