mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Merge pull request #783 from Alfresco/dev-wabson-781
Remove maximum username length validation
This commit is contained in:
@@ -41,7 +41,7 @@ export class LoginDemoComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(public router: Router) {
|
constructor(public router: Router) {
|
||||||
this.customValidation = {
|
this.customValidation = {
|
||||||
username: ['', Validators.compose([Validators.required, Validators.minLength(4), Validators.maxLength(15)])],
|
username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],
|
||||||
password: ['', Validators.required]
|
password: ['', Validators.required]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,6 @@ export class LoginDemoComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.alfrescologin.addCustomValidationError('username', 'required', 'LOGIN.MESSAGES.USERNAME-REQUIRED');
|
this.alfrescologin.addCustomValidationError('username', 'required', 'LOGIN.MESSAGES.USERNAME-REQUIRED');
|
||||||
this.alfrescologin.addCustomValidationError('username', 'minlength', 'LOGIN.MESSAGES.USERNAME-MIN');
|
this.alfrescologin.addCustomValidationError('username', 'minlength', 'LOGIN.MESSAGES.USERNAME-MIN');
|
||||||
this.alfrescologin.addCustomValidationError('username', 'maxlength', 'Username must not be longer than 11 characters.');
|
|
||||||
this.alfrescologin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
|
this.alfrescologin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user