Files: 048321cc6c9ebaeaf4431e5123f1c9afcfbecb6f / errors / sync / isPositionChoiceError.js
371 bytesRaw
1 | const Validator = require('is-my-json-valid') |
2 | const schema = require('../schema/positionChoiceError') |
3 | const validator = Validator(schema, {verbose: true}) |
4 | |
5 | module.exports = function isPositionChoiceError (obj) { |
6 | const result = validator(obj) |
7 | |
8 | // exposes error messages provided by is-my-json-valid |
9 | isPositionChoiceError.errors = validator.errors |
10 | |
11 | return result |
12 | } |
13 |
Built with git-ssb-web