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
- Host: GitHub
- URL: https://github.com/shaunmolloy/joi-postcode
- Owner: shaunmolloy
- Created: 2021-04-24T12:45:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T09:47:04.000Z (over 4 years ago)
- Last Synced: 2025-05-01T04:28:48.946Z (9 months ago)
- Topics: jest, joi, postcode
- Language: JavaScript
- Homepage:
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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