@rilix/ajv-keywords

0.1.1 • Public • Published

@rilix/ajv-keywords

Build Status Test Coverage Code Climate Issue Count

This lid adds some keywords to ajv, mainly to facilitate our translations.

How to user:

import Ajv from 'ajv';
import rilixAjvKeywords from '@rilix/ajv-keywords';

const ajv = new Ajv();
rilixAjvKeywords(ajv);

ajv.validate({ email: true }, 'example@example.com'); // true
ajv.validate({ email: true }, 'example'); // false

For more usage examples please refer to the spec folder or open an issue with a question.

Readme

Keywords

none

Package Sidebar

Install

npm i @rilix/ajv-keywords

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • rilix