UNPKG

brazilian-values

Version:

Validates and formats brazilian values, like money (BRL), CPF, CNPJ, dates etc.

28 lines (27 loc) 564 B
/** * Check if value is a valid brazilian phone number. It can check a wide * variety of formats optionally with DDI, DDD and the ninth digit. * * @example ```js * isPhone('+55 (11) 98273-1182') * //=> true * * isPhone('11 98273 1182') * //=> true * * isPhone('1139723768') * //=> true * * isPhone('(23) 3972-3768') * //=> false * * isPhone('(13) 65093-2093') * //=> false * * isPhone('(81) 555 178') * //=> false * ``` * @param value */ declare const isPhone: (value: string) => boolean; export default isPhone;