You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

patternRequired.js 412B

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