mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
refactor: validators
This commit is contained in:
1 parent
5e8df7ae01
commit
ad66191d88
4 files changed
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import { check } from 'express-validator'
|
||||
import { noError } from '../../middleware/validator.js'
|
||||
|
||||
export const checkQuestId = () =>
|
||||
check('questId').notEmpty().isString().isLowercase().isLength({ max: 64 })
|
||||
|
||||
export const questIdValidator = [checkQuestId(), noError]
|
||||
Reference in new issue
Block a user