Projekt

Obecné

Profil

Stáhnout (412 Bajtů) Statistiky
| Větev: | Revize:
1
'use strict';
2

    
3
module.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
};
(13-13/21)