UNPKG

@kerthin/domain

Version:
14 lines 643 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IsMobilePhone = void 0; const isMobilePhone_1 = require("validator/lib/isMobilePhone"); const apply_validation_1 = require("./apply-validation"); const IsMobilePhone = (locale, validationOptions) => (0, apply_validation_1.applyValidation)({ code: 'IS_MOBILE', defaultMessage: 'The value must be a mobile phone.', validate: (value) => { return typeof value === 'string' && (0, isMobilePhone_1.default)(value, locale); } }, validationOptions); exports.IsMobilePhone = IsMobilePhone; //# sourceMappingURL=is-mobile-phone.validator.js.map