title: AngularJS: integrating with server-side validation
body: <p>I have an angular app that contains a save button taken from the examples:</p>
  
  <pre><code>&lt;button ng-click="save" ng-disabled="form.$invalid"&gt;SAVE&lt;/button&gt;
  </code></pre>
  
  <p>This works great for client side validation because <code>form.$invalid</code> becomes false as user fixes problems, but I have an email field which is set invalid if another user is registered with same email. </p>
  
  <p>As soon as I set my email field invalid, I cannot submit the form, and the user has no way to fix that validation error. So now I can no longer use <code>form.$invalid</code> to disable my submit button.</p>
  
  <p>There must be a better way</p>