fix: update Discord ID regex to include 19 digit IDs (#2860)

pull/2884/head
Chun Yeung Wong 2 years ago committed by GitHub
parent aed1409f29
commit 9da8461225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,7 +80,7 @@ const UserGeneralSettings: React.FC = () => {
const UserGeneralSettingsSchema = Yup.object().shape({
discordId: Yup.string()
.nullable()
.matches(/^\d{17,18}$/, intl.formatMessage(messages.validationDiscordId)),
.matches(/^\d{17,19}$/, intl.formatMessage(messages.validationDiscordId)),
});
useEffect(() => {

@ -46,7 +46,7 @@ const UserNotificationsDiscord: React.FC = () => {
.required(intl.formatMessage(messages.validationDiscordId)),
otherwise: Yup.string().nullable(),
})
.matches(/^\d{17,18}$/, intl.formatMessage(messages.validationDiscordId)),
.matches(/^\d{17,19}$/, intl.formatMessage(messages.validationDiscordId)),
});
if (!data && !error) {

Loading…
Cancel
Save