Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Tests Django validation across models, forms, views, and templates, placing each rule at the layer that owns it.
Use this skill ↓64% 91%+27 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 14 of 22 without it.
3 of 3 safety checks passed
Not used yet
Use this skill to place validation tests at the layer that owns the rule, then prove the user-facing error path still works. Django validation often crosses model, form, view, and template boundaries; keep those responsibilities explicit.
Primary source: Harry Percival, Test-Driven Development with Python, 3rd ed. Guidance is transformed and paraphrased from chapters 14-16 and Appendix A, especially model constraints, form validation, ModelForm tradeoffs, view-level error surfacing, and duplicate item handling.
Classify the validation rule.
Write the lowest useful failing test.
Prove invalid data is not persisted.
Refactor toward the right boundary.
Read validation-patterns.md for layer choices and common Django edge cases.
save() can bypass validation, test the path that actually runs validation or enforce the rule with constraints.Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.