Catmandu::Fix::validate3pm
Validate data and keep errors
Usage
# Check author field against a JSON Schemavalidate('author', JSONSchema, schema: 'my/schema.json')if exists(errors)... # do somethingend# Check item against a custom validator, store in errors in 'warnings'validate('author', MyValidatorClass, error_field: warnings)
Overview
This Catmandu::Fix validates data with a Catmandu::Validator and stores errors in field "errors" for further inspection.
Configuration
- error_field
-
Path where to store errors. Set to
"errors"by default.
Additional options are passed to the validator.
Releases
4 releases since Debian 10 (Buster); the text changed 3 times.