MishkaGervaz.Form.Verifiers.ValidateSource (MishkaGervaz v0.0.1-alpha.2)

Copy Markdown View Source

Validates the source section of MishkaGervaz form DSL.

Ensures every required action (create, update, read) is defined either on the resource or inherited from the domain — compilation fails when both are nil. Resource overrides win when both are set.

The verifier short-circuits when no fields are declared (a form without fields has no source to consume).

The master_check requirement is enforced upstream by MishkaGervaz.Form.Transformers.MergeDefaults.merge_master_check_default/1, which always persists a fallback MFA when neither resource nor domain defines one — the verifier no longer guards that path.

See MishkaGervaz.Form.Dsl.Source, MishkaGervaz.Form.Transformers.MergeDefaults, MishkaGervaz.Form.Verifiers.Helpers, and sibling verifiers.