title: kendo ui upload validation
body: <p>I am trying to validate if the user click Import button while no file being selected and if the user select non csv file. Please advise,it currently it does not validate on anything. Even i have place the validation onSubmit button. Please advise, thank you</p>
  
  <p>here is the code:</p>
  
  <pre><code>  @(Html.Kendo().Upload()
                  .HtmlAttributes(new { @Style = "align:center; font-size:12px; background-color:#3399FF" })     
                  .Name("FileUpload")
                  .Multiple(false)
                  .Events(ev =&gt; ev.Success("onSuccess"))
      )
  
  &lt;script type="text/javascript"&gt;
  
    $(document).ready(function () {
  
   $(".k-button.k-upload-button").after(' &lt;input type="submit" id="btnSubmit" value="Import" style="height:31px; font-size:14px; background-color:#3399FF" class="k-button" /&gt;');
  
  $('#btnSubmit').click(function (e){
  
              var theFileElement = document.getElementById("FileUpload");
              filename = theFileElement.value;
  
              if(filename.length == 0)
              {
                  alert("Please select a csv file to import");
                  return false;
              }
              else if (!/\.csv$/i.test(filename)) {
                  alert("Please upload csv file only");
                  return false;
              }
              return true;
  
          });
  
  
  
  });
  
  
  
  
  &lt;/script&gt;
  </code></pre>