diff --git a/client/modules/User/components/SignupForm.jsx b/client/modules/User/components/SignupForm.jsx index 75ab6910e..2f80a595d 100644 --- a/client/modules/User/components/SignupForm.jsx +++ b/client/modules/User/components/SignupForm.jsx @@ -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) {