Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #308

Merged
merged 1 commit into from
Feb 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ $ gem install json-schema-2.5.2.gem
Usage
-----

Three base validation methods exist: `validate`, `validate!`, and
`fully_validate`. The first returns a boolean on whether a validation attempt
passes and the second will throw a `JSON::Schema::ValidationError` with an
appropriate message/trace on where the validation failed. The third validation
method does not immediately fail upon a validation error and instead builds an
array of validation errors return when validation is complete.
Three base validation methods exist:

1. `validate`: returns a boolean on whether a validation attempt passes
2. `validate!`: throws a `JSON::Schema::ValidationError` with an appropriate message/trace on where the validation failed
3. `fully_validate`: builds an array of validation errors return when validation is complete

All methods take two arguments, which can be either a JSON string, a file
containing JSON, or a Ruby object representing JSON data. The first argument to
Expand Down