Skip to content

Commit

Permalink
fix(@aws-amplify/ui-components): handle non-username alias (#7663)
Browse files Browse the repository at this point in the history
  • Loading branch information
wlee221 authored Feb 1, 2021
1 parent 88cba94 commit 651c3b2
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 651c3b2

Please sign in to comment.