Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ajv-currency-code

Adds a currency_code format to Ajv.

Install

npm i --save @socketkit/ajv-currency-code

Setup

importAjvfrom'ajv'importcurrenyCodefrom'@socketkit/ajv-currency-code'constajv=newAjv()currencyCode(ajv)

Usage

When defining your JSON schema, use the format keyword with ther value set to currency_code. For example

{
"type": "object",
"properties": {
"currency": {
"type": "string",
"format": "currency_code"
}
}
}

About

Ajv plugin for validating currency codes

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages