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
425 B
JavaScript
12 lines
425 B
JavaScript
"use strict";
|
|
|
|
const { validateValue } = require("@validatem/core");
|
|
const isMSISDN = require("./");
|
|
|
|
console.log(validateValue("1234567890123", [ isMSISDN ])); // 1234567890123
|
|
|
|
console.log(validateValue("999999999999999999999999999", [ isMSISDN ])); /*
|
|
AggregrateValidationError: One or more validation errors occurred:
|
|
- At (root): Must be an E.164 MSISDN (Must have a length between 1 and 15; actual length was 27)
|
|
*/
|