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
375 B
JavaScript
12 lines
375 B
JavaScript
"use strict";
|
|
|
|
const { validateValue } = require("@validatem/core");
|
|
const isRegularExpression = require("./");
|
|
|
|
console.log(validateValue(/[a-z]+/, [ isRegularExpression ])); // /[a-z]+/
|
|
|
|
console.log(validateValue("hello world", [ isRegularExpression ])); /*
|
|
AggregrateValidationError: One or more validation errors occurred:
|
|
- At (root): Must be a regular expression
|
|
*/
|