I have a form as follows where it fires validation for text box controls but not for file upload
<form id="frmItem">
<table class="table table-bordered">
<thead class="bg-dark text-center text-white">
<tr>
<th colspan="2">Add/Modify Item</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:404px;">Item ID Name</td>
<td>
@(Html.Kendo().TextBox().Name("txtItemName")
.HtmlAttributes(new { placeholder = "Item ID Name", required = "required", validationmessage = "Enter Item ID Name" }))
</td>
</tr>
<tr>
<td>UN Number</td>
<td>
@(Html.Kendo().TextBox().Name("txtUnNumber")
.HtmlAttributes(new { placeholder = "UN Number", required = "required", validationmessage = "Enter UN Number" }))
</td>
</tr>
<tr>
<td>Packing Instructions</td>
<td>
@(Html.Kendo().TextBox().Name("txtPackingInstructions")
.HtmlAttributes(new { placeholder = "Packing Instructions", required = "required", validationmessage = "Enter Packing Instructions" }))
</td>
</tr>
<tr>
<td>SDS Sheet</td>
<td>
@(Html.Kendo().Upload().Name("SdsSheet")
.Multiple(false)
.HtmlAttributes(new { required = "required" }))
</td>
</tr>
<tr>
<td>Cargo Only?</td>
<td>@(Html.Kendo().CheckBox().Name("txtCargoOnly"))</td>
</tr>
<tr>
<td>Example Shipment Ground (Fully Regulated)</td>
<td>@(Html.Kendo().Upload().Name("GroundShipment"))</td>
</tr>
<tr>
<td>Example Shipment Next Day Air (Fully Regulated)</td>
<td>@(Html.Kendo().Upload().Name("NextDayShipment"))</td>
</tr>
<tr>
<td>Example Shipment Freight (Fully Regulated)</td>
<td>@(Html.Kendo().Upload().Name("FreightShipment"))</td>
</tr>
<tr>
<td>Example Shipment Ground (Limited Quantity)</td>
<td>@(Html.Kendo().Upload().Name("GroundShipmentLimited"))</td>
</tr>
<tr>
<td>Example Shipment Next Day Air (Limited Quantity)</td>
<td>@(Html.Kendo().Upload().Name("NextDayShipmentLimited"))</td>
</tr>
<tr>
<td>Example Shipment Freight (Limited Quantity)</td>
<td>@(Html.Kendo().Upload().Name("FreightShipmentLimited"))</td>
</tr>
<tr>
<td colspan="2">
<button class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md" type="submit">Submit</button>
</td>
</tr>
</tbody>
</table>
</form>
<script>
$(document).ready(function () {
var validator = $("#frmItem").kendoValidator().data("kendoValidator");
$("#frmItem").submit(function (event) {
event.preventDefault();
if (validator.validate()) {
} else {
}
});
});
</script>
Also for the same how can we pass the file to the api
https://demos.telerik.com/aspnet-mvc/form/api
Also I am unable to call my own controller post method based on this demo