"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PhoneNumber = void 0;

var _validators = require("./validators");

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/* Copyright (c) 2018 Mobify Research & Development Inc. All rights reserved. */

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * @memberOf module:types
 * @typedef {String} PhoneNumber
 */
var PhoneNumber = (0, _validators.makeValidator)(function (x) {
  return new RegExp('^\\+?[1-9]\\d{1,14}$').test(x);
}, 'Not a valid Phone Number.');
exports.PhoneNumber = PhoneNumber;