📜  oneOf(validationChains[, message]) - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:39.839000             🧑  作者: Mango

代码示例1
// This protected route must be accessed either by passing both username + password,
// or by passing an access token
app.post(
  '/protected/route',
  oneOf([
    [check('username').exists(), check('password').exists()],
    check('access_token').exists()
  ]),
  someRouteHandler,
);