UNPKG

412 BJavaScriptView Raw
1'use strict';
2
3module.exports = function defFunc(ajv) {
4 defFunc.definition = {
5 type: 'object',
6 inline: require('./dotjs/patternRequired'),
7 statements: true,
8 errors: 'full',
9 metaSchema: {
10 type: 'array',
11 items: {
12 type: 'string',
13 format: 'regex'
14 },
15 uniqueItems: true
16 }
17 };
18
19 ajv.addKeyword('patternRequired', defFunc.definition);
20 return ajv;
21};