Commit 2df97a0d authored by dev0tion's avatar dev0tion

Adjust wallet name restrictions

parent 80cdb66b
......@@ -30,12 +30,12 @@ export class CreateComponent {
"walletName": ["",
Validators.compose([
Validators.required,
Validators.minLength(3),
Validators.minLength(1),
Validators.maxLength(24),
Validators.pattern(/^[a-zA-Z0-9]*$/)
])
],
"walletPassword": ["",
"walletPassword": ["",
Validators.compose([
Validators.required,
Validators.pattern(/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{10,})/)])
......@@ -75,10 +75,10 @@ export class CreateComponent {
validationMessages = {
'walletName': {
'required': 'Name is required.',
'minlength': 'Name must be at least 3 characters long.',
'maxlength': 'Name cannot be more than 24 characters long.',
'pattern': 'Enter a valid wallet name. [a-Z] and [0-9] are the only characters allowed.'
'required': 'A wallet name is required.',
'minlength': 'A wallet name must be at least one character long.',
'maxlength': 'A wallet name cannot be more than 24 characters long.',
'pattern': 'Please enter a valid wallet name. [a-Z] and [0-9] are the only characters allowed.'
},
'walletPassword': {
'required': 'A password is required.',
......
......@@ -35,8 +35,9 @@ export class RecoverComponent implements OnInit {
"walletPassword": ["", Validators.required],
"walletName": ["", [
Validators.required,
Validators.minLength(3),
Validators.maxLength(24)
Validators.minLength(1),
Validators.maxLength(24),
Validators.pattern(/^[a-zA-Z0-9]*$/)
]
],
"selectNetwork": ["test", Validators.required]
......@@ -77,10 +78,11 @@ export class RecoverComponent implements OnInit {
'required': 'A password is required.'
},
'walletName': {
'required': 'Name is required.',
'minlength': 'Name must be at least 3 characters long.',
'maxlength': 'Name cannot be more than 24 characters long.'
}
'required': 'A wallet name is required.',
'minlength': 'A wallet name must be at least one character long.',
'maxlength': 'A wallet name cannot be more than 24 characters long.',
'pattern': 'Please enter a valid wallet name. [a-Z] and [0-9] are the only characters allowed.'
},
};
private onBackClicked() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment