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

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