Validator.requierid conditional


#1

Hi guys,

I have this

   <ion-item>
          <ion-label> Pets</ion-label>
          <ion-toggle color="secondary" [(ngModel)]="isLookAfterFlg" name="isLookAfterFlg"> </ion-toggle>
        </ion-item>
        <ion-item *ngIf="isLookAfterFlg === true">
          <ion-label>Type</ion-label>
          <ion-select [(ngModel)]="user.lookAfterFlg" formControlName="lookAfterFlg"">
            <ion-option *ngFor="let petTime of listOfValuesTime" [value]="petTime.value">{{petTime.name}}</ion-option>
          </ion-select>
        </ion-item>

I won’t that lookAfterFlg was requeried if isLookAfterFlg was checked. Any idea? I’m usin <form [formGroup]="todo" (ngSubmit)="saveForm()">

Thx