title: How to invalidate a form in angularjs? (or how to disable a form in angularjs?)
body: <p>I want to preven form submission for a specific user type, preferably without having to edit something in the controller and without using an any type input-field? So basically something like this:</p>
  
  <pre><code>&lt;form&gt;
    &lt;div class ="alert" 
         ng-if="user.type='not-allowed'" 
         maybe-an-invalidate-directive&gt;
        &lt;p&gt;No! Don't!&lt;/p&gt;
  
        &lt;!-- or something like this ??? --&gt;
        &lt;input type ="hidden" 
               required
               ng-model="'false'"&gt;
    &lt;/div&gt;
   .... 
  &lt;/form&gt;
  </code></pre>
  
  <p>While the first one should be definately possible, I would be happy to hear about a more straightforward solution.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>After thinking about it for a while, I figured that what I want to do, is not making the form invalid, but to disable it. For <a href="https://stackoverflow.com/questions/21638079/angularjs-disabling-all-form-controls-between-submit-and-server-response">a solution see this question</a>.</p>