UNPKG

@azapfy/utils_validations-br

Version:

A validator to BR informations - Fork from validations-br

13 lines (12 loc) 435 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validatePA = void 0; var ce_1 = require("./ce"); function validatePA(ie) { var ieStr = String(ie).replace(/\D/g, ''); var allowedPrefixes = ['15', '75', '76', '77', '78', '79']; if (!allowedPrefixes.includes(ieStr.substr(0, 2))) return false; return (0, ce_1.validateCE)(ieStr); } exports.validatePA = validatePA;