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
377 B
JavaScript

"use strict";
const { validateValue } = require("@validatem/core");
const isEmailAddress = require("./");
console.log(validateValue("hello@example.com", [ isEmailAddress ])); // hello@example.com
console.log(validateValue("hello world", [ isEmailAddress ])); /*
AggregrateValidationError: One or more validation errors occurred:
- At (root): Must be an e-mail address
*/