home / skills / makfly / superpowers-symfony / form-types-validation
This skill strengthens Symfony form types validation and authorization by applying test-backed boundaries at controllers and API operations.
npx playbooks add skill makfly/superpowers-symfony --skill form-types-validationReview the files below or copy the command above to add this skill to your agents.
---
name: symfony:form-types-validation
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
description: Strengthen Symfony authorization and validation boundaries with explicit, test-backed enforcement. Use for form types validation tasks.
---
# Form Types Validation (Symfony)
## Use when
- Hardening access-control or validation boundaries.
- Aligning voters/security expressions with domain rules.
## Default workflow
1. Map actor/resource/action decision matrix.
2. Implement voter/constraint logic at the right boundary.
2. Wire checks at controllers and API operations.
2. Test allowed/forbidden/invalid paths comprehensively.
## Guardrails
- Avoid policy logic duplication across layers.
- Do not leak privileged state via error detail.
- Preserve explicit deny behavior for sensitive actions.
## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
## Output contract
- Security boundary updates.
- Integration points enforcing decisions.
- Negative-path test results.
## References
- `reference.md`
- `docs/complexity-tiers.md`
This skill strengthens Symfony authorization and validation boundaries by enforcing explicit checks at form type and controller boundaries. It guides mapping actor-resource-action matrices, placing voters and constraints correctly, and producing test-backed negative and positive path coverage. The result is clearer responsibility, fewer duplicated policies, and safer error exposure.
The skill inspects form types, validators, and voter implementations to ensure access control and validation live at the correct boundary. It recommends wiring checks into controllers and API operations, and it generates a test matrix that exercises allowed, forbidden, and invalid paths. Outputs include suggested boundary updates, integration points, and failing negative-path tests to prevent regressions.
Where should I put complex business rules?
Place access decisions in voters or policy services and keep validation-specific rules in form constraints. Avoid duplicating the same rule in both places.
How do I test negative paths effectively?
Build a decision matrix of actor/resource/action combinations and write tests for allowed, forbidden, and invalid inputs to ensure behavior stays explicit.