Skip to content

Commit

Permalink
Merge pull request #2111 from ORCID/FixValidationErrorOnIsbn
Browse files Browse the repository at this point in the history
Return null observer
  • Loading branch information
leomendoza123 authored Dec 7, 2023
2 parents e12bd25 + 2e5f2a6 commit 5501099
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 5501099

Please sign in to comment.