Skip to content

socketkit/ajv-base64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ajv-base64

Adds a uuid format to Ajv.

Install

npm i --save @socketkit/ajv-base64

Setup

import Ajv from 'ajv'
import base64 from '@socketkit/ajv-base64'
const ajv = new Ajv()
base64(ajv)

Usage

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

{
  "type": "object",
  "properties": {
    "field_name": {
      "type": "string",
      "format": "base64"
    }
  }
}

About

Ajv plugin for validating base64 fields

Resources

Stars

Watchers

Forks

Packages

No packages published