Skip to content
Snippets Groups Projects
Commit 56917c4b authored by Mahdi Yari's avatar Mahdi Yari
Browse files

Update utils.js

parent 349d0055
No related branches found
No related tags found
1 merge request!31Fix username validation
......@@ -46,9 +46,10 @@ export function validateAccountName(value) {
if (!/^[a-z0-9-]*$/.test(label)) {
return suffix + "have only letters, digits, or dashes.";
}
if (/--/.test(label)) {
return suffix + "have only one dash in a row.";
}
// Multiple dashes in a row is VALID
// if (/--/.test(label)) {
// return suffix + "have only one dash in a row.";
// }
if (!/[a-z0-9]$/.test(label)) {
return suffix + "end with a letter or digit.";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment