no white space validation in reactive form angular 7 code example
Example 1: angular form validation whitespace
<div *ngIf="yourForm.hasError('whitespace')">Please enter valid data</div>
Example 2: angular form validation whitespace
new FormControl(field.fieldValue || '', [Validators.required, this.noWhitespaceValidator])