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) // IMO 7035341

/joi-imo-number-extension/

    Package Sidebar

    Install

    npm i joi-imo-number-extension

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    4.83 kB

    Total Files

    5

    Last publish

    Collaborators

    • ruchevits