alertlogic/jesse — pull request #1 by alatnikov (2013-05-27 11:09:59+00:00)
Title: New feature: return full list of errors on invalid input

This pull request accumulates changes related to the new feature introducing capability to return full list of errors, found during validation.

Errors are collected into the list in reverse order:

```erlang
-type error_source_type() :: 'data_invalid' | 'schema_invalid'.
-spec validate_with_accumulator(Schema :: json_term(),
Input :: json_term()) ->
{ok, Input} |
{error, [
{SourceType :: error_source_type(),
Source :: json_term(),
Type :: atom(),
Data :: json_term()}
]}.
```

There is also a capability to provide your own accumulator by specifying accumulator fun like in `jesse:validate_with_accumulator/5`.