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.

12 lines
342 B
JavaScript

"use strict";
const { validateValue } = require("@validatem/core");
const isValue = require("./");
console.log(validateValue("foo", [ isValue("foo") ])); // foo
console.log(validateValue("bar", [ isValue("foo") ])); /*
AggregrateValidationError: One or more validation errors occurred:
- At (root): Must be exactly this value: 'foo'
*/