allowing .-_ in github and twitter names

closes #3729
This commit is contained in:
Miodec 2022-11-08 12:45:17 +01:00
parent 272c2b1c7c
commit 0f589b0e5b

View file

@ -462,8 +462,8 @@ router.patch(
keyboard: profileDetailsBase.max(75),
selectedBadgeId: joi.number(),
socialProfiles: joi.object({
twitter: profileDetailsBase.alphanum().max(20),
github: profileDetailsBase.alphanum().max(39),
twitter: profileDetailsBase.regex(/^[0-9a-zA-Z_.-]+$/).max(20),
github: profileDetailsBase.regex(/^[0-9a-zA-Z_.-]+$/).max(39),
website: profileDetailsBase
.uri({
scheme: "https",