Skip to content

Commit 5053658

Browse files
DSS-317: Can enter email and check box on Non of non-compliance
1 parent f2833a7 commit 5053658

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/src/app/features/components/compliance-notice/compliance-notice.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ export class ComplianceNoticeComponent implements OnInit {
159159
}
160160

161161
onAlternativeDeliveryChanged(value: CheckboxChangeEvent): void {
162-
if (value.checked)
162+
if (value.checked) {
163+
this.hostEmailControl.setValue('');
163164
this.hostEmailControl.removeValidators([Validators.required]);
164-
else
165+
}
166+
else {
165167
this.hostEmailControl.addValidators([Validators.required]);
168+
}
166169

167170
this.hostEmailControl.updateValueAndValidity();
168171
this.myForm.updateValueAndValidity();

0 commit comments

Comments
 (0)