Skip to content

Commit

Permalink
ACS-6085 Set type for validateEmptyName function
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Oct 12, 2023
1 parent 1fe7f39 commit a10db40
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import {
NgForm,
FormsModule,
ReactiveFormsModule,
FormControl
FormControl,
ValidationErrors
} from '@angular/forms';
import { QueriesApi, SiteEntry, SitePaging } from '@alfresco/js-api';
import { Store } from '@ngrx/store';
Expand Down Expand Up @@ -225,7 +226,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro
.subscribe(handle);
}

private validateEmptyName(control: FormControl<string>) {
private validateEmptyName(control: FormControl<string>): ValidationErrors {
return control.value.length && !control.value.trim() ? { empty: true } : null;
}
}

0 comments on commit a10db40

Please sign in to comment.