fix(ui): also allow 17 digit discord ids

fixes #971
pull/980/head
sct 4 years ago
parent b4bac6a915
commit 57c00c1ea7

@ -17,7 +17,7 @@ const messages = defineMessages({
enableNotifications: 'Enable Notifications',
discordId: 'Discord User ID',
discordIdTip:
'The <FindDiscordIdLink>18-digit ID number</FindDiscordIdLink> for your Discord user account',
'The <FindDiscordIdLink>ID number</FindDiscordIdLink> for your Discord user account',
validationDiscordId: 'You must provide a valid Discord user ID',
save: 'Save Changes',
saving: 'Saving…',
@ -39,7 +39,7 @@ const UserNotificationSettings: React.FC = () => {
const UserNotificationSettingsSchema = Yup.object().shape({
discordId: Yup.string()
.optional()
.matches(/^\d{18}$/, intl.formatMessage(messages.validationDiscordId)),
.matches(/^\d{17,18}$/, intl.formatMessage(messages.validationDiscordId)),
});
if (!data && !error) {

@ -676,7 +676,7 @@
"components.UserProfile.UserSettings.UserGeneralSettings.toastSettingsFailure": "Something went wrong while saving settings.",
"components.UserProfile.UserSettings.UserGeneralSettings.toastSettingsSuccess": "Settings successfully saved!",
"components.UserProfile.UserSettings.UserNotificationSettings.discordId": "Discord ID",
"components.UserProfile.UserSettings.UserNotificationSettings.discordIdTip": "The <FindDiscordIdLink>18-digit ID number</FindDiscordIdLink> for your Discord user account",
"components.UserProfile.UserSettings.UserNotificationSettings.discordIdTip": "The <FindDiscordIdLink>ID number</FindDiscordIdLink> for your Discord user account",
"components.UserProfile.UserSettings.UserNotificationSettings.enableNotifications": "Enable Notifications",
"components.UserProfile.UserSettings.UserNotificationSettings.localuser": "Local User",
"components.UserProfile.UserSettings.UserNotificationSettings.notificationsettings": "Notification Settings",

Loading…
Cancel
Save