diff --git a/src/validators/expressValidator/customValidators.js b/src/validators/expressValidator/customValidators.js index abd0ef6..31d6dc9 100644 --- a/src/validators/expressValidator/customValidators.js +++ b/src/validators/expressValidator/customValidators.js @@ -3,9 +3,11 @@ import { check } from 'express-validator' const varChar = (field, { max = 255 } = {}) => check(field).isString().trim().isLength({ min: 1, max }).withMessage(`|${field}| must be a string with a length between 1 and ${max}`) const integer = field => check(field).isInt({min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER}).withMessage(`|${field}| must be an integer`) const uuid = field => check(field).isUUID('all').withMessage(`|${field}| must be a valid UUID`) +const bigInt = field => check(field).isBigInt().withMessage(`|${field}| must be a valid BigInt`) export { integer, uuid, varChar, -} + bigInt +} \ No newline at end of file