UNPKG

pimatic

Version:

A home automation server and framework for the Raspberry PI running on node.js

16 lines (13 loc) 531 B
// ****************************************************************** // § 5.2. Validation keywords for strings // ****************************************************************** var Errors = require('../../../errors.js'); module.exports = function(config) { var errors = []; if (config.inst.length > config.schema.maxLength) { errors.push(new Errors.StringValidationError(config.resolutionScope, config.instanceContext, 'maxLength', config.schema.maxLength, config.inst.length)); } return errors; };