Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
">
{{ 'userManagement.controls.username.errors.required' | transloco }}
</mat-error>
<mat-error
*ngIf="
rootForm.get('profileDetailsGroup.username')?.errors?.['minlength']
">
{{ 'userManagement.controls.username.errors.minLength' | transloco }}
</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export abstract class DfUserDetailsBaseComponent<T> implements OnInit {
) {
this.userForm = this.fb.group({
profileDetailsGroup: this.fb.group({
username: [''],
username: ['', Validators.minLength(6)],
email: ['', Validators.email],
firstName: [''],
lastName: [''],
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/userManagement/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"altLabel": "Enter Username",
"optional": "(Optional, defaults to email address)",
"errors": {
"required": "Username is required"
"required": "Username is required",
"minLength": "Username must be at least 6 characters long"
}
},
"email": {
Expand Down