How to validate after trimming value in reactive forms 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])