An open API service indexing awesome lists of open source software.

https://github.com/shaunmolloy/joi-postcode

Joi postcode extension using ideal-postcodes/postcode to validate
https://github.com/shaunmolloy/joi-postcode

jest joi postcode

Last synced: 8 months ago
JSON representation

Joi postcode extension using ideal-postcodes/postcode to validate

Awesome Lists containing this project

README

          

# Joi Postcode

![npm version](https://img.shields.io/npm/v/@shaunmolloy/joi-postcode)

Validate postcodes with this Joi postcode extension.
Using [ideal-postcodes/postcode](https://github.com/ideal-postcodes/postcode) behind the scenes.

### Install

```sh
npm i @shaunmolloy/joi-postcode
```

### Basic usage

```js
import JoiPostcode from '@shaunmolloy/joi-postcode';

const schema = JoiPostcode.string();
schema.validate('SW1A 2AA');
```

### License

MIT