oil-station/gasStation-uni/node_modules/ajv-keywords/keywords/patternRequired.js
2024-09-24 17:24:39 +08:00

22 lines
412 B
JavaScript

'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;
};