Skip to content

Commit

Permalink
Merge pull request #308 from ScottKbka/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
iainbeeston committed Feb 18, 2016
2 parents f7b542e + 5d57af4 commit e16ab7a
Showing 1 changed file with 5 additions and 6 deletions.
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

0 comments on commit e16ab7a

Please sign in to comment.