I have a custom validation for if a condition is true. Based on that condition I would like to set disabled on a input field in a formgroup. If I use the condition with *ngIf it works fine but if I use the same condition with [disabled]= nothing is happening.
// working part
<div *ngIf="groupForm.errors?.validateForMr && (groupForm.touched || groupForm.dirty)" class="cross-validation-error-message alert alert-danger">
Name cannot match alter ego.
</div>
// and the part I can't get to work
<input type="text" [disabled]="!groupForm.errors?.validateForMr" id="mr_nr" class="form-control" formControlName="mr_nr" (focus)="focusIn(2)" (focusout)="focusOut(2)">
Anyone have a suggestion?