title: angular - how to use setcustomvalidity function
body: <p>I try to used the html setcustomvalidity method to set my biz validation, but the form cannot block the custom validity. How to use this function at angular?</p>
  
  <p>form:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export class AutoComponent {
    autoFiled: any;
    
    @ViewChild('autoForm') autoForm;
    @ViewChild('autoInput', { read: ElementRef}) autoInput: ElementRef;
    
    check() {
      if (autoField != '123') {
        this.autoInput.nativeElement.setCustomValidity('Not Equals 123');
        this.autoForm.submitted = true;
        return false;
      }
      
      return true;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form novalidate #autoForm="ngForm"
    [class.invalid]="!autoForm.submitted"&gt;
    &lt;input #autoInput type="text" name="auto" [(ngModel)]="autoField"/&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>