overleaf/services/project-history/app/js/Validation.js
Alf Eaton ee85d948e2 Avoid duplicating a math-closing dollar sign (#11227)
GitOrigin-RevId: ef2ef77e26df59d1af3df6dc664e284d3c70102d
2023-01-16 08:41:42 +00:00

12 lines
242 B
JavaScript

import { celebrate, errors } from 'celebrate'
export { Joi } from 'celebrate'
export const errorMiddleware = errors()
/**
* Validation middleware
*/
export function validate(schema) {
return celebrate(schema, { allowUnknown: true })
}