How should I go about conditionally requiring a form field? I made a custom validator, but the conditional variables that I pass to the custom validator are static and remai
Simply use enable() and disable() methods on AbstractControl.
enable()
disable()
AbstractControl
this.myControl.valueChanges.subscribe( checked => { if (checked) { this.otherControl.enable(); } else { this.otherControl.disable(); } } );