Commit 5e2b8ab8 authored by Jan's avatar Jan Committed by Rémy Coutable

Resolve "Bug: When creating an account with invalid characters the error is...

Resolve "Bug: When creating an account with invalid characters the error is "Username already taken" not "Invalid characters used""
parent 115ab79b
...@@ -62,13 +62,13 @@ export default class UsernameValidator { ...@@ -62,13 +62,13 @@ export default class UsernameValidator {
return this.setPendingState(); return this.setPendingState();
} }
if (!this.state.available) {
return this.setUnavailableState();
}
if (!this.state.valid) { if (!this.state.valid) {
return this.setInvalidState(); return this.setInvalidState();
} }
if (!this.state.available) {
return this.setUnavailableState();
}
} }
interceptInvalid(event) { interceptInvalid(event) {
...@@ -89,7 +89,6 @@ export default class UsernameValidator { ...@@ -89,7 +89,6 @@ export default class UsernameValidator {
setAvailabilityState(usernameTaken) { setAvailabilityState(usernameTaken) {
if (usernameTaken) { if (usernameTaken) {
this.state.valid = false;
this.state.available = false; this.state.available = false;
} else { } else {
this.state.available = true; this.state.available = true;
......
---
title: 'Fix username validation order on signup, resolves #45575'
merge_request: 19610
author: Jan Beckmann
type: fixed
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