Validate objects against predefined rules (node.js).