I am using a simple reactive form in Angular6.
this.phoneForm = this._formBuilder.group({
oldMac: new FormControl('', Validators.compose([
Validators.required,
Validators.pattern('')
])),
newMac: ['', Validators.required],
newModel: ['', [Validators.required]],
targetCluster: ['', [Validators.required]],
ownerUser: ['', [Validators.required]]
}, { updateOn: 'blur' });
To reset I am using this.phoneForm.reset();
, it is clearing the form but does not clear the validators, my form is showing as invalid.
Please help
EDIT: I forget to add that I am using angular-material input.