Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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: 10 days 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