title: How to perform conditional validation in html Angular form
body: <p>I have a form where I want to implement the MAXLENGTH validation only if the value is not equal to 0. </p>
  
  <p>So if <code>parameter.valueMaxlength === 0 { then dont execute maxlength validation }</code>
  Is there a way to write this logic in the <strong>html</strong> file.</p>
  
  <pre><code> &lt;mat-form-field *ngSwitchCase="'TEXTBOX'" class="example-full-width"&gt;
    &lt;input
      matInput
      [placeholder]="parameter.displayName"
      [formControlName]="parameter.id"
      [id]="parameter.id"
      [type]="parameter.dataType"
      [maxlength] = "parameter.valueMaxlength"
  
    /&gt;
  &lt;/mat-form-field&gt;
  </code></pre>