Skip to content

Commit

Permalink
chore(clerk-js): Allow single-character usernames in `<UserProfile />…
Browse files Browse the repository at this point in the history
…` validation (#4243)
  • Loading branch information
nikospapcom authored Sep 30, 2024
1 parent cb41e2c commit c49eaa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cold-mayflies-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/clerk-js": patch
---

Allow single-character usernames in `<UserProfile />` validation
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const UsernameForm = withCardStateProvider((props: UsernameFormProps) =>
const isUsernameRequired = userSettings.attributes.username.required;

const canSubmit =
(isUsernameRequired ? usernameField.value.length > 1 : true) && user.username !== usernameField.value;
(isUsernameRequired ? usernameField.value.length > 0 : true) && user.username !== usernameField.value;

const updatePassword = async () => {
try {
Expand Down

0 comments on commit c49eaa7

Please sign in to comment.