validate

validate function to check structured data agains structured requirements

The idea was to use this function call in conditions expecting falsy value (zero) if valid or truthy value (object with issues described) if not.

image