- {{ validatorService.descriptionForValidator(err.key, err.value) }}
+
+ {{ err.value["errorMessage"] }}
diff --git a/src/app/core/common-components/error-hint/error-hint.component.ts b/src/app/core/common-components/error-hint/error-hint.component.ts
index d1c7007a97..3612566ea0 100644
--- a/src/app/core/common-components/error-hint/error-hint.component.ts
+++ b/src/app/core/common-components/error-hint/error-hint.component.ts
@@ -1,6 +1,5 @@
import { Component, Input } from "@angular/core";
import { UntypedFormControl } from "@angular/forms";
-import { DynamicValidatorsService } from "../entity-form/dynamic-form-validators/dynamic-validators.service";
import { KeyValuePipe, NgForOf } from "@angular/common";
@Component({
@@ -12,6 +11,4 @@ import { KeyValuePipe, NgForOf } from "@angular/common";
})
export class ErrorHintComponent {
@Input() form: UntypedFormControl;
-
- constructor(public validatorService: DynamicValidatorsService) {}
}
diff --git a/src/app/core/form-dialog/row-details/row-details.component.ts b/src/app/core/form-dialog/row-details/row-details.component.ts
index dcebe47d03..2c47908c6e 100644
--- a/src/app/core/form-dialog/row-details/row-details.component.ts
+++ b/src/app/core/form-dialog/row-details/row-details.component.ts
@@ -65,6 +65,10 @@ export class RowDetailsComponent {
@Inject(MAT_DIALOG_DATA) public data: DetailsComponentData,
private formService: EntityFormService,
) {
+ this.init(data);
+ }
+
+ private init(data: DetailsComponentData) {
this.form = this.formService.createFormGroup(data.columns, data.entity);
this.enableSaveWithoutChangesIfNew(data.entity);
diff --git a/src/app/core/user/user.ts b/src/app/core/user/user.ts
index 4c390db113..83d5e4538d 100644
--- a/src/app/core/user/user.ts
+++ b/src/app/core/user/user.ts
@@ -37,7 +37,7 @@ export class User extends Entity {
/** username used for login and identification */
@DatabaseField({
label: $localize`:Label of username:Username`,
- validators: { required: true },
+ validators: { required: true, uniqueId: "User" },
})
set name(value: string) {
if (this._name && value !== this._name) {