"use strict"; const { validateValue } = require("@validatem/core"); const matchesFormat = require("./"); let rule = matchesFormat(/^[a-z0-9]+$/); console.log(validateValue("hello", [ rule ])); // hello console.log(validateValue("hello world", [ rule ])); /* AggregrateValidationError: One or more validation errors occurred: - At (root): Must match format: /^[a-z0-9]+$/ */