title: Conditional Required Validation with buttons in AngularJS
body: <p>I having two buttons as Save and Submit and some of the drop-downs and text-boxes. There is need to validate some of the fields on click of Submit, not on click of Save. Please find the code in below. </p>
  
  <pre><code>&lt;button class="btn btn-default custom_edit" 
                              data-ng-click="orderForm.$valid &amp;&amp; saveOrder('save')" 
                              data-ng-if="!order.IsSubmitted"
                              data-ng-model="status"
                              value="save"&gt;Save&lt;/button&gt;
  &lt;button class="btn btn-success" 
                              data-ng-click="orderForm.$valid &amp;&amp; saveOrder('submit')" 
                              data-ng-if="!order.IsSubmitted"
                              data-ng-model="status"
                              value="submit"&gt;Submit&lt;/button&gt;
  
   &lt;input type="text" class="form-control" name="_requisition" placeholder="Requisition"
                                          data-ng-model="order.Requisition"
                                          data-ng-trim="true"
                                          data-ng-required="status=='save'"/&gt;
  </code></pre>
  
  <p>I have tried by using value &amp; model with buttons and applied it with ng-required , however it's not working.</p>