Skip to content

Commit

Permalink
fixes-processing#3235:userName_dup_check
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyushsawan committed Nov 3, 2024
1 parent e2e62e6 commit 7100e11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/modules/User/components/SignupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ function asyncValidate(fieldToValidate, value) {
});
}

let timeoutId;
function validateUsername(username) {
return asyncValidate('username', username);
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
asyncValidate('username', username);
}, 500);
}

function validateEmail(email) {
Expand Down

0 comments on commit 7100e11

Please sign in to comment.