---
name: "Catmandu::Fix::Condition::valid"
section: "3pm"
platform: "linux"
package: "libcatmandu-perl"
version: "1.2024-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::Condition::valid"
---

# Catmandu::Fix::Condition::valid(3pm)

Execute fixes if the data passes validation

## 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

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