# br-phone-validator-lib

> Cell number and fixed phone number validator lib

Latest version **1.0.2** (published 2020-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install br-phone-validator-lib
pnpm add br-phone-validator-lib
yarn add br-phone-validator-lib
bun add br-phone-validator-lib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-07-27 |
| First published | 2020-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Idyl Icaro dos Santos |
| Maintainers | idylicaro |
| Keywords | validator, brasil, brazil, validation, phoneNumber |

## Links

- npm: https://www.npmjs.com/package/br-phone-validator-lib
- Repository: https://github.com/idylicaro/Br-Phone-Validator-Lib
- Homepage: https://github.com/idylicaro/Br-Phone-Validator-Lib#readme
- Issues: https://github.com/idylicaro/Br-Phone-Validator-Lib/issues
- npm.io page: https://npm.io/package/br-phone-validator-lib

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-07-27
- 1.0.1 — 2020-07-26
- 1.0.0 — 2020-07-26

## README

# Br-Phone-Validator-Lib
Cell number and fixed phone number validator

[![Build Status](https://travis-ci.com/idylicaro/Br-Phone-Validator-Lib.svg?branch=master)](https://travis-ci.com/idylicaro/Br-Phone-Validator-Lib)

---
Valid for these formats:

```
`(xx) xxxxx-xxxx` or
`(xx) xxxx-xxxx` or
`xxxxxxxxxxx` or
`xxxxxxxxxx` or
```

## Install
```
npm i br-phone-validator-lib
```

## Usage
```typescript
import PhoneBrValidator from 'br-phone-validator-lib'

PhoneBrValidator.isPhone('(79) 99212-2212') // return  true
PhoneBrValidator.isPhone('(79) 9212-2212')  // return false because first number after DDD in number fixed should not is 0 or 1 or 9
PhoneBrValidator.isPhone('(79) 3212-2212')  // return true 
PhoneBrValidator.isPhone('79992122212')     // return true
PhoneBrValidator.isPhone('7992122212')      // return false because first number after DDD in number fixed should not is 0 or 1 or 9
PhoneBrValidator.isPhone('7932122212')      // return true
```

---
_Source: https://npm.io/package/br-phone-validator-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
