UNPKG

mip-validator

Version:
11 lines (9 loc) 344 B
const ERR = require('../error/dfn.json') const matcher = require('../matcher.js') exports.onAttr = function(attr, attrRule, node, rule, error) { if (attrRule.value) { if (matcher.matchValue(attr.value, attrRule.value)) return var err = ERR.INVALID_ATTR_VALUE error(err, node.tagName, attr.name, attr.value) } }