readme
parent
88e65a1800
commit
2de9b9e91e
|
@ -66,17 +66,17 @@ Create ajv instance.
|
|||
|
||||
##### .compile(Object schema) -> Function<Object data>
|
||||
|
||||
Generate validating function and cache compiled schema for future use.
|
||||
Generate validating function and cache the compiled schema for future use.
|
||||
|
||||
|
||||
##### .validate(Object schema|String key|String ref, data) -> Boolean
|
||||
|
||||
Validate data using passed schema (it will be compiled and cached).
|
||||
|
||||
Instead of the schema you can use the key that was previously passed to `addSchema` or a previously resolved reference.
|
||||
Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.
|
||||
|
||||
|
||||
##### .addSchema(Array schemas|Object schema [, String key]) -> Function<Object data>
|
||||
##### .addSchema(Array schemas|Object schema [, String key]) -> Function<Object data>|Array<Function<Object data>>
|
||||
|
||||
Add and compile schema(s). It does the same as `.compile` with two differences:
|
||||
|
||||
|
|
Loading…
Reference in New Issue