angular check formgroup valid code example
Example 1: angular formgroup validate manually
//Validate all the form group
this.form.updateValueAndValidity();
//Validate only one form control
this.form.controls['formControlName'].updateValueAndValidity();
Example 2: formgroup check if valid
form: FormGroup;
onSubmit(){
//checks if form is valid
if( this.form.valid){
//more code here
}
}