title: Validate special characters in angular
body: <pre><code>ngOnInit(): void {
    this.customerForm = this.fb.group({
      name: ['', Validators.required],
      customer_id: ['', Validators.required],        
    })
  }
  </code></pre>
  <p>I have this form group in angular. So This a form which contains name and customer_id. What I need is that I want to validate the name field.It shouldn't accept any special characters. If possible please mention also to mention in using toastr</p>
  <pre><code>&lt;td&gt;
      &lt;mat-form-field&gt;
          &lt;mat-label&gt;Name&lt;/mat-label&gt;
          &lt;input matInput placeholder=&quot;Name&quot; formControlName=&quot;name&quot; autocomplete=&quot;off&quot; required&gt;
      &lt;/mat-form-field&gt;
  &lt;/td&gt;
  </code></pre>