Skip to content

Commit

Permalink
Change access code length (4-12)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkovacs81 committed Mar 16, 2020
1 parent 1e5a19f commit 0b22abb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/user/user-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export class UserDetailComponent extends ConfigurationBaseComponent implements O
}

updateForm(user: User) {
const accessCode = new FormControl(user.access_code, [Validators.pattern('^\\d{4,8}$')]);
const accessCode = new FormControl(user.access_code, [Validators.pattern('^\\d{4,12}$')]);

if (!user.id) {
accessCode.setValidators([Validators.required, Validators.pattern('^\\d{4,8}$')]);
accessCode.setValidators([Validators.required, Validators.pattern('^\\d{4,12}$')]);
}

this.userForm = this.fb.group({
Expand Down

0 comments on commit 0b22abb

Please sign in to comment.