summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorJan <king-jan1999@hotmail.de>2018-06-13 10:42:40 +0000
committerRémy Coutable <remy@rymai.me>2018-06-13 10:42:40 +0000
commit5e2b8ab8d7d80f91a6d1e1951041defcd431b841 (patch)
tree775bec75d05cb91804cd0c686a8a81d94af5955f /app/assets/javascripts
parent115ab79b702ea19aec45c884e3b0caa95ca02e88 (diff)
downloadgitlab-ce-5e2b8ab8d7d80f91a6d1e1951041defcd431b841.tar.gz
Resolve "Bug: When creating an account with invalid characters the error is "Username already taken" not "Invalid characters used""
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/pages/sessions/new/username_validator.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/assets/javascripts/pages/sessions/new/username_validator.js b/app/assets/javascripts/pages/sessions/new/username_validator.js
index 825de01b5a2..87213c94eda 100644
--- a/app/assets/javascripts/pages/sessions/new/username_validator.js
+++ b/app/assets/javascripts/pages/sessions/new/username_validator.js
@@ -62,13 +62,13 @@ export default class UsernameValidator {
return this.setPendingState();
}
- if (!this.state.available) {
- return this.setUnavailableState();
- }
-
if (!this.state.valid) {
return this.setInvalidState();
}
+
+ if (!this.state.available) {
+ return this.setUnavailableState();
+ }
}
interceptInvalid(event) {
@@ -89,7 +89,6 @@ export default class UsernameValidator {
setAvailabilityState(usernameTaken) {
if (usernameTaken) {
- this.state.valid = false;
this.state.available = false;
} else {
this.state.available = true;