You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
275 B
JavaScript

"use strict";
const isDateObject = require("./is-date-object");
const ValidationError = require("@validatem/error");
module.exports = function (value) {
if (!isDateObject(value)) {
throw new ValidationError("Must be a Date object", { code: "validatem.is-date" });
}
};