freeCodeCamp/server/middlewares/validator.js

10 lines
207 B
JavaScript

import validator from 'express-validator';
export default validator.bind(validator, {
customValidators: {
matchRegex: function matchRegex(param, regex) {
return regex.test(param);
}
}
});