title: Disable button while input is not valid Angular
body: <p>I'd like to make certain input-fields only available for <code>integer</code> or <code>decimal</code>-values. So I got the following code:</p>
  
  <pre><code>&lt;input type="text" pattern="[0-9]*" [(ngModel)]="myValue" pInputText class="medium-field"
      (change)="calculate()"/&gt;
  </code></pre>
  
  <p>So this field is marked if the pattern does not match the input. Still I would like to disable the <code>submit</code>-button while the pattern is not matched. Can I somehow access that value as a boolean or is there another way?</p>