# `PgFlow.DSL.Validation`
[🔗](https://github.com/agoodway/pgflow/blob/v0.1.0/lib/pgflow/dsl/validation.ex#L1)

Compile-time validation helpers for PgFlow DSL macros.

Used internally by `PgFlow.Flow` and `PgFlow.Job` to
validate module attributes during compilation.

# `validate_cron_option!`

```elixir
@spec validate_cron_option!(String.t() | keyword(), Macro.Env.t()) ::
  {String.t(), map()} | no_return()
```

Validates the cron option.

Accepts either:
- A string shorthand: `cron: "@hourly"` (equivalent to `cron: [schedule: "@hourly"]`)
- A keyword list: `cron: [schedule: "@hourly", input: %{key: "value"}]`

Options when using keyword list:
- `:schedule` is required and must be a valid cron expression string
- `:input` is optional and must be a map (defaults to `%{}`)

Returns `{schedule, input}` tuple on success.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
