mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Login - change required username characters (#1487)
* #1480 Change required username characters * Fix unit test error
This commit is contained in:
committed by
Mario Romano
parent
399b716d82
commit
10a76cc0f6
@@ -98,8 +98,8 @@ describe('AlfrescoLogin', () => {
|
||||
expect(element.querySelector('#username-error').innerText).toEqual('LOGIN.MESSAGES.USERNAME-MIN');
|
||||
});
|
||||
|
||||
it('should render validation min-length error when the username is lower than 4 characters', () => {
|
||||
usernameInput.value = '123';
|
||||
it('should render validation min-length error when the username is lower than 2 characters', () => {
|
||||
usernameInput.value = '1';
|
||||
usernameInput.dispatchEvent(new Event('input'));
|
||||
|
||||
fixture.detectChanges();
|
||||
|
@@ -262,7 +262,7 @@ export class AlfrescoLoginComponent implements OnInit {
|
||||
|
||||
private initFormFieldsDefault() {
|
||||
this.form = this._fb.group({
|
||||
username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],
|
||||
username: ['', Validators.compose([Validators.required, Validators.minLength(2)])],
|
||||
password: ['', Validators.required]
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user