From ba19d819815ce22f823e54bf020bd8a1cd38ece3 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 6 Dec 2023 10:59:33 -0600 Subject: [PATCH] Return null observer --- .../components/work-form/work-form/work-form.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/record/components/work-form/work-form/work-form.component.ts b/src/app/record/components/work-form/work-form/work-form.component.ts index 05bb607bfb..1b5ee1ba3b 100644 --- a/src/app/record/components/work-form/work-form/work-form.component.ts +++ b/src/app/record/components/work-form/work-form/work-form.component.ts @@ -271,7 +271,7 @@ export class WorkFormComponent implements OnInit { if (!(control.value?.length === 10 || control.value?.length === 13)) { return of({ validFormat: true }) } else { - return of({}) + return of(null) } } else { return this._workService @@ -517,9 +517,7 @@ export class WorkFormComponent implements OnInit { saveEvent() { this.workForm.markAllAsTouched() const formErrors = GetFormErrors(this.workForm) - const allowInvalidForm = this.formHasOnlyAllowError(formErrors) - if (this.workForm.valid || allowInvalidForm) { const work: Work = { visibility: {