mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-28 08:43:07 +08:00
stricter schema
This commit is contained in:
parent
62ebee77b5
commit
2d858bece4
1 changed files with 5 additions and 1 deletions
|
@ -108,6 +108,7 @@ router.post(
|
|||
language: joi
|
||||
.string()
|
||||
.regex(/^[\w+]+$/)
|
||||
.max(50)
|
||||
.required(),
|
||||
},
|
||||
}),
|
||||
|
@ -131,7 +132,10 @@ router.post(
|
|||
validateRequest({
|
||||
body: {
|
||||
quoteId: withCustomMessages.regex(/\d+/).required(),
|
||||
quoteLanguage: withCustomMessages.regex(/^[\w+]+$/).required(),
|
||||
quoteLanguage: withCustomMessages
|
||||
.regex(/^[\w+]+$/)
|
||||
.max(50)
|
||||
.required(),
|
||||
reason: joi
|
||||
.string()
|
||||
.valid(
|
||||
|
|
Loading…
Reference in a new issue