# joi-phone

> joi-phone validates international phone number complying to E.164 numbering format

Latest version **0.0.1** (published 2014-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install joi-phone
pnpm add joi-phone
yarn add joi-phone
bun add joi-phone
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-12-17 |
| First published | 2014-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrew Keig |
| Maintainers | airasoul |

## Links

- npm: https://www.npmjs.com/package/joi-phone
- npm.io page: https://npm.io/package/joi-phone

## Recent versions

- 0.0.1 (latest) — 2014-12-17

## README

# joi-phone

A phone validator for Joi.

`joi-phone` validates that a value is a valid international phone number complying to `E.164` numbering format

[![Build Status](https://travis-ci.org/andrewkeig/joi-phone.svg?branch=master)](https://travis-ci.org/andrewkeig/joi-phone)

## Introduction

An international E.164 number is designed to include all of the necessary information to 
successfully route a call to an individual subscriber on a nation's public telephone network. 
Here's how the E.164 numbering plan works:

- A telephone number can have a maximum of 15 digits
- The first part of the telephone number is the country code (one to three digits)
- The second part is the national destination code (NDC)
- The last part is the subscriber number (SN)
- The NDC and SN together are collectively called the national (significant) number

```
[+][country code][subscriber number including area code or national (significant) number]
```

## Use

```
var Joi = require('joi');
Joi.phone = require('joi-phone');

var schema = {
  phone: Joi.phone.e164()
}

```

### Installation

```
npm install joi-phone --save
```

### Tests


- `make test` runs tests


## License

[MIT](https://github.com/andrewkeig/joi-phone/blob/master/LICENSE)

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