Merge pull request #783 from Alfresco/dev-wabson-781

Remove maximum username length validation
This commit is contained in:
Maurizio Vitale
2016-09-21 20:20:21 +01:00
committed by GitHub

View File

@@ -41,7 +41,7 @@ export class LoginDemoComponent implements OnInit {
constructor(public router: Router) {
this.customValidation = {
username: ['', Validators.compose([Validators.required, Validators.minLength(4), Validators.maxLength(15)])],
username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],
password: ['', Validators.required]
};
}
@@ -49,7 +49,6 @@ export class LoginDemoComponent implements OnInit {
ngOnInit() {
this.alfrescologin.addCustomValidationError('username', 'required', 'LOGIN.MESSAGES.USERNAME-REQUIRED');
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');
}