disallow spaces in id input

This commit is contained in:
saml33 2022-02-11 13:33:55 +11:00 committed by tjs
parent 8ec666d048
commit 51a9b498c8
1 changed files with 3 additions and 2 deletions

View File

@ -114,8 +114,9 @@ export default function Referral() {
}, [hasCopied])
const onChangeRefIdInput = (value) => {
setCustomRefLinkInput(value)
if (customRefLinkInput.length > 32) {
const id = value.replace(/ /g, '')
setCustomRefLinkInput(id)
if (id.length > 32) {
setInputError('Referral IDs must be less then 33 characters')
} else {
setInputError('')