Skip to content

Commit

Permalink
note on errors in readme, #65
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Oct 22, 2015
1 parent 946ada0 commit 3073b00
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
45 changes: 25 additions & 20 deletions KEYWORDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,31 @@ The keywords and their values define what rules the data should satisfy to be va
## Keywords

- [type](#type)
- [maximum/minimum and exclusiveMaximum/exclusiveMinimum](#maximum--minimum-and-exclusivemaximum--exclusiveminimum)
- [multipleOf](#multipleof)
- [maxLength/minLength](#maxlength--minlength)
- [pattern](#pattern)
- [format](#format)
- [maxItems/minItems](#maxitems--minitems)
- [uniqueItems](#uniqueitems)
- [items](#items)
- [additionalItems](#additionalitems)
- [maxProperties/minProperties](#maxproperties--minproperties)
- [required](#required)
- [properties](#properties)
- [patternProperties](#patternproperties)
- [additionalProperties](#additionalproperties)
- [dependencies](#dependencies)
- [enum](#enum)
- [not](#not)
- [oneOf](#oneof)
- [anyOf](#anyof)
- [allOf](#allof)
- [Keywords for numbers](#keywords-for-numbers)
- [maximum/minimum and exclusiveMaximum/exclusiveMinimum](#maximum--minimum-and-exclusivemaximum--exclusiveminimum)
- [multipleOf](#multipleof)
- [Keywords for strings](#keywords-for-strings)
- [maxLength/minLength](#maxlength--minlength)
- [pattern](#pattern)
- [format](#format)
- [Keywords for arrays](#keywords-for-arrays)
- [maxItems/minItems](#maxitems--minitems)
- [uniqueItems](#uniqueitems)
- [items](#items)
- [additionalItems](#additionalitems)
- [Keywords for objects](#keywords-for-objects)
- [maxProperties/minProperties](#maxproperties--minproperties)
- [required](#required)
- [properties](#properties)
- [patternProperties](#patternproperties)
- [additionalProperties](#additionalproperties)
- [dependencies](#dependencies)
- [Keywords for all types](#keywords-for-all-types)
- [enum](#enum)
- [not](#not)
- [oneOf](#oneof)
- [anyOf](#anyof)
- [allOf](#allof)



Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ ajv compiles schemas to functions and caches them in all cases (using stringifie

The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).

__Please note__: every time validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback).


## Using in browser

Expand Down Expand Up @@ -191,6 +193,8 @@ Instead of the schema you can use the key that was previously passed to `addSche

Validation errors will be available in the `errors` property of ajv instance (`null` if there were no errors).

__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.


##### .addSchema(Array<Object>|Object schema [, String key])

Expand Down

0 comments on commit 3073b00

Please sign in to comment.