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.
15 lines
295 B
JavaScript
15 lines
295 B
JavaScript
4 years ago
|
"use strict";
|
||
|
|
||
|
const anything = require("./");
|
||
|
const { validateValue } = require("@validatem/core");
|
||
|
|
||
|
let rules = {
|
||
|
someProperty: [ anything ]
|
||
|
};
|
||
|
|
||
|
let value = {
|
||
|
someProperty: "foo"
|
||
|
};
|
||
|
|
||
|
console.log(validateValue(value, rules)); // This will pass without errors. Output: { someProperty: 'foo' }
|