refactor: validators

This commit is contained in:
wancat committed 2024-02-19 19:09:32 +08:00
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]