title: How to validate excel file in angular js?
body: <p>i am implementing a file upload service and need a validation for excel file.
  my form look like this:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;input type="hidden" name="key" value="uploads/${filename}"&gt;
          &lt;table class="content-centered"&gt;
             &lt;tr&gt;
                &lt;td&gt;&lt;input type="file" file-model="imageToUpload" data-rule-required="true"
                   accept="application/vnd.ms-excel" /&gt;&lt;/td&gt;
                &lt;td&gt;&lt;span ng-class="{errorMessage: fileStatus.status == false,
                regularMessage: fileStatus.status == true}"&gt; &amp;nbsp{{fileStatus.message}}
                 &lt;/span&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
             &lt;/table&gt;
  
          &lt;div class="centered" style="margin-top: 12px;"&gt;
              &lt;div ng-click='imageUpload()' class="btn blueBtn"&gt;Upload &amp;nbsp;&amp;nbsp;
                  &lt;span class="glyphicon glyphicon-upload"&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div ng-click='$close()' class="btn orgBtn"&gt;Close&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>i have used <code>data-rule-required="true"</code> and <code>accept="application/vnd.ms-excel</code>" for validation.but it didn't work. do you have any idea about how file validation work in angular js?</p>