Normandy.Guardrails.Builtins.RequiredFields (normandy v0.6.0)

View Source

Rejects a struct or map when any of the named fields are nil.

Intended for output guardrails: Normandy's ValidationMiddleware already enforces schema-level required constraints, but this guard lets callers assert on fields whose "must be populated" requirement is runtime (for example, a response schema where result is optional in the spec but must be present in this particular workflow).

Options

  • :fields (required) — non-empty list of atoms.

Emits one violation per missing field, each with :path set to [field] so existing error renderers show the field name.