'How to validate a date to be after another date using express validator
How to check if start_of_application is before end_of_application?
const { body } = require("express-validator");
exports.createJob = () => {
return [
body("start_of_application")
.isDate()
.withMessage("Start of application must be a date"),
body("end_of_application")
.isDate()
.withMessage("End of application must be a date"),
// Check if end_of_application is after start_of_application
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
