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

Description Usage Arguments Value See Also Examples

Description

Add a string format to an Ajv instance.

Usage

1
ajv.addFormat(this, key, format)

Arguments

this

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

key

String; the name with format to add.

format

the format to be added. Note that JavaScript object literals should be enclosed in a call to JS. (i.e. ajv$addFormat("numbers",JS("/^\\d+$/")))

Value

invisible(NULL)

See Also

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

Examples

1
2
3
4
5
## Not run: 
my_ajv_instance = Ajv()
my_ajv_instance$keyword(key,object)

## End(Not run)

jdthorpe/ajvr documentation built on May 18, 2019, 11:37 p.m.