joi-imo-number-extension
1.1.0 • Public • Published Joi IMO Number Extension
A Joi extension for validationg vessel IMO numbers.
Installation
npm install --save joi-imo-number-extension
Usage
const BaseJoi = require('joi')
const JoiIMONumberExtension = require('joi-imo-number-extension')
const Joi = BaseJoi.extend(JoiIMONumberExtension)
const schema = Joi.string().imoNumber()
const result = await schema.validate('IMO 7035341')
console.log(result)
/joi-imo-number-extension/
//
Package Sidebar
Install
npm i joi-imo-number-extension
Weekly Downloads