Hopefully fix roblox user input

This commit is contained in:
Regalijan 2024-03-02 02:54:21 -05:00
parent c5472f587d
commit fe6065f8f6
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -301,7 +301,8 @@ export default function () {
if ( if (
data.match(/\W/) || data.match(/\W/) ||
data.length > 20 || data.length > 20 ||
(data.match(/_/g)?.length || 0) > 1 || // Need Number pseudo-constructor since matches might be null
Number(data.match(/_/g)?.length) > 1 ||
data.startsWith("_") data.startsWith("_")
) )
e.preventDefault(); e.preventDefault();