logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

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

Name

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

See Also

       See Catmandu::Fix::validate to check and get validation errors.

perl v5.40.0                                       2025-01-17               Catmandu::Fix::Condition::valid(3pm)

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