I want to add a validator to my FormControl that validates the form if a boolean is false.
There is requiredTrue
but I need the opposite. Is there a validator for requiredFalse
?
this.myForm.controls.existObjectsWithThisStudyIdControl.addValidators(Validators.requiredFalse);
Another option is to rename my variable which is
existObjectsWithThisStudyId
tononeObjectsExistWithThisStudyId
and then use requiredTrue. But it feels like a bad practice for naming.