ajv.validate: A wrapper for the Ajv.validate method

Description Usage Arguments See Also Examples

View source: R/ajv_methods.R

Description

The equivalent of calling var ajv = new Ajv(); ajv.validate(...) in javascript.

Usage

1
ajv.validate(this, schema, data)

Arguments

this

An AJV instance, provided implicitly when called via my_instance$validate(...)

schema

The Schema with which to validate the data. schema may be a valid JSON string, an R object (i.e. 'list(...)'), a connection to a JSON file, or the name of a JSON or YAML file. YAML files are parsed via [js-yaml](https://www.npmjs.com/package/js-yaml)'s 'safeLoad()' method.

data

The data to be validated. may be any of the above foremats.

See Also

Other AJV.Instance.Methods: ajv.addFormat, ajv.addKeyword, ajv.addSchema, ajv.errorsText, ajv.keyword, ajv.removeSchema, ajv.validateSchema

Examples

1
2
3
4
5
## Not run: 
my_ajv_instance = Ajv()
my_ajv_instance$validate

## End(Not run)

Example output

function (...) 
ajv.validate(x, ...)
<environment: 0x25895a8>

ajv documentation built on May 2, 2019, 2:11 p.m.