how to validate user input in angular form code example
Example: angular9+how+to+add+validators
this.form.controls["firstName"].setValidators([Validators.minLength(1), Validators.maxLength(30)]);
this.form.controls["firstName"].setValidators([Validators.minLength(1), Validators.maxLength(30)]);