Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ajv-uuid

Adds a uuid format to Ajv.

Install

npm i --save @socketkit/ajv-uuid

Setup

importAjvfrom'ajv'importbase64from'@socketkit/ajv-base64'constajv=newAjv()base64(ajv)

Usage

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

{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
}
}
}

About

Ajv plugin for validating UUID type fields

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages