Man pages sections > man3 > Catmandu::Fix::Condition::valid

Catmandu::Fix::Condition::valid - Execute fixes if the data passes validation

Catmandu::Fix::Condition::valid(3pm) User Contributed Perl Documentation Catmandu::Fix::Condition::valid(3pm)

NAME

Catmandu::Fix::Condition::valid - Execute fixes if the data passes validation

SYNOPSIS

    # reject all items not conforming to a schema
    select valid('', JSONSchema, schema: "my/schema.json")
    # check the author field
    unless valid(author, JSONSchema, schema: "my/author.schema.json")
       ... # repair or give warning
    end

SEE ALSO

Catmandu::Fix
2017-10-01 perl v5.26.0