如何使用 express 验证器来确保正文或查询仅包含某些字段?即类似的东西:
const { body, query } = require('express-validator/check')
body.containsOnly("field1", "field2", "field3")
query.containsOnly("queryParam1", "queryParam2")
如何使用 express 验证器来确保正文或查询仅包含某些字段?即类似的东西:
const { body, query } = require('express-validator/check')
body.containsOnly("field1", "field2", "field3")
query.containsOnly("queryParam1", "queryParam2")