is-valid and is-invalid class based on boolean value in angular dont show it initially code example
Example 1: validation minlength angular
Validators.minLength(9)
Example 2: angular9+how+to+add+validators
this.form.controls["firstName"].setValidators([Validators.minLength(1), Validators.maxLength(30)]);