We currenty have a legacy project, that needs to be maintained until the final version implementing angular-final is deployed.
In final I can easily apply conditional Validators using:
this.myForm.controls['name'].setValidators(Validators.required)
Obviously the set method was not available back then, the only exposed thing was
validator: ValidatorFN;
property on AbstractControl.
So following this, I tried setting it by just doing:
this.myForm.controls['someControl'].validator(Validators.required)
which will unfortunately throw the following error:
"Cannot read property 'validationViolations' of undefined"