"use strict"; const { validateValue } = require("@validatem/core"); const hasLengthOf = require("./"); console.log(validateValue("foo", [ hasLengthOf(3) ])); // foo console.log(validateValue("foo bar", [ hasLengthOf(3) ])); /* AggregrateValidationError: One or more validation errors occurred: - At (root): Must have a length of exactly 3; actual length was 7 */