Constructor
new LISTOFERRORS(errors)
Example
blueconfig.addFormat({ // Allow to do: config.*.name, by example : config.app1.name, config.app2.name
name: 'children',
validate: function(children, schema, fullname) {
Object.keys(children).forEach((keyname) => {
try {
const conf = blueconfig(schema.children).merge(children[keyname]).validate();
this.set(keyname, conf.getProperties());
} catch (err) { errors.push(err); }
});
if (errors.length !== 0) { throw new LISTOFERRORS(errors) }
}
});
Parameters:
-
errors
Array.<BLUECONFIG_ERROR> -
List of errors
Extends
- BLUECONFIG_ERROR