emoteCloner: allow other characters in sticker names (#1140)

* allow spaces and other characters in cloning sticker names

* fix

* stickers have a different character limit
This commit is contained in:
Animal 2023-05-16 13:22:46 -04:00 committed by GitHub
parent 3f2bcd2cab
commit fc943b7778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,8 @@ function CloneModal({ data }: { data: Sticker | Emoji; }) {
setName(v);
}}
validate={v =>
(v.length > 1 && v.length < 32 && nameValidator.test(v))
(data.t === "Emoji" && v.length > 2 && v.length < 32 && nameValidator.test(v))
|| (data.t === "Sticker" && v.length > 2 && v.length < 30)
|| "Name must be between 2 and 32 characters and only contain alphanumeric characters"
}
/>