Am I thinking about this all wrong, or am I missing something really obvious?
Python's style guide say's less code is better (and I don't think that's subjective... It's a fact), so consider this.
To use forms for all validation means that to write a model field subclass with custom validation, you'd have to:
- Subclass models.Field
- Subclass forms.Field
- Add custom validation to your forms.Field subclass
- Set your custom form field as the default form field for the custom model field
- Always use a django model form if you want to perform validation
With all validation in the model you'd just have to:
- Subclass models.Field
- Add custom validation to your models.Field subclass
Now you could use your model field in an API that bypasses all use of web forms, and you'd still have validation at lowest level. If you used web forms, the validation would propagate upwards.
Is there a way to do this without having to write the Django team and wait for them to fix this error?