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
355 B
JavaScript
12 lines
355 B
JavaScript
4 years ago
|
"use strict";
|
||
|
|
||
|
const { validateValue } = require("@validatem/core");
|
||
|
const isUppercase = require("./");
|
||
|
|
||
|
console.log(validateValue("HELLO WORLD!", [ isUppercase ])); // HELLO WORLD!
|
||
|
|
||
|
console.log(validateValue("Hello World!", [ isUppercase ])); /*
|
||
|
AggregrateValidationError: One or more validation errors occurred:
|
||
|
- At (root): Must be all-uppercase
|
||
|
*/
|