mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-04 20:47:54 +08:00
more regex validation
This commit is contained in:
parent
6bdf6de1f6
commit
385fc00ea2
1 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,10 @@ const RESULT_SCHEMA = joi
|
|||
rawWpm: joi.number().required(),
|
||||
restartCount: joi.number().required(),
|
||||
smoothConsistency: joi.number().optional(), // to be removed
|
||||
tags: joi.array().items(joi.string()).required(),
|
||||
tags: joi
|
||||
.array()
|
||||
.items(joi.string().regex(/^[a-f\d]{24}$/i))
|
||||
.required(),
|
||||
testDuration: joi.number().required().min(1),
|
||||
timestamp: joi.date().timestamp().required(),
|
||||
uid: joi.string().required(),
|
||||
|
|
Loading…
Add table
Reference in a new issue