Remove maximum username length validation

(Text was also mis-leading stating 11 chars not 15)

Refs #781
This commit is contained in:
Will Abson
2016-09-21 09:16:52 +01:00
parent ce9d2d96c6
commit 48ed440dcf

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');
}