GoScrobble/web/node_modules/ajv-keywords/keywords/patternRequired.js

22 lines
412 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
'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;
};