Catmandu::Fix::validate(3pm)

Catmandu::Fix::validate3pm

Validate data and keep errors

Usage

   # Check author field against a JSON Schema
   validate('author', JSONSchema, schema: 'my/schema.json')
   if exists(errors)
      ... # do something
   end
   # 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.

  1. 10
  2. 11
  3. 12
  4. 13

From libcatmandu-perl 1.2024-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.