Skip to content

Commit

Permalink
fix: update Discord ID regex to include 19 digit IDs (#2860)
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-cywong committed Aug 3, 2022
1 parent aed1409 commit 9da8461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9da8461

Please sign in to comment.