Module

contracts.rules_form_routes

Form action → route contract matching.

Validates that<form action="/path" method="post">targets have routes withFormContractdeclarations. This complements the existing target check (which validates URL existence) by surfacing POST routes that may silently ignore form data or lack validation.

Functions

check_form_action_contracts 2 list[ContractIssue]
Info when a form POSTs to a route without a FormContract. Routes that accept P…
def check_form_action_contracts(template_sources: dict[str, str], router: Router) -> list[ContractIssue]

Info when a form POSTs to a route without a FormContract.

Routes that accept POST without declaring a FormContract may silently ignore form data or lack proper validation. This is INFO-level because many routes legitimately handle form data without a formal contract.

Parameters
Name Type Description
template_sources dict[str, str]
router Router
Returns
list[ContractIssue]