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.
contracts.rules_form_routes
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
check_form_action_contracts
function
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 | Default | Description |
|---|---|---|---|
template_sources
|
dict[str, str]
|
— | |
router
|
Router
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_form_routes.py:1