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.
21 lines
412 B
21 lines
412 B
'use strict'; |
|
|
|
module.exports = function defFunc(ajv) { |
|
defFunc.definition = { |
|
type: 'object', |
|
inline: require('./dotjs/patternRequired'), |
|
statements: true, |
|
errors: 'full', |
|
metaSchema: { |
|
type: 'array', |
|
items: { |
|
type: 'string', |
|
format: 'regex' |
|
}, |
|
uniqueItems: true |
|
} |
|
}; |
|
|
|
ajv.addKeyword('patternRequired', defFunc.definition); |
|
return ajv; |
|
};
|
|
|