Skip to content

Commit

Permalink
fix(@aws-amplify/ui-components): handle non-username alias (aws-ampli…
Browse files Browse the repository at this point in the history
  • Loading branch information
wlee221 authored and Daniel Gonzalez committed Mar 18, 2021
1 parent 7052cc6 commit 3b0baa4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ export class AmplifySignUp {
break;
}
try {
if (!this.signUpAttributes.username) {
throw new Error(Translations.EMPTY_USERNAME);
}
if (this.signUpAttributes.username.indexOf(' ') >= 0) {
throw new Error(Translations.USERNAME_REMOVE_WHITESPACE);
}
Expand Down

0 comments on commit 3b0baa4

Please sign in to comment.