#6845: Model validation and its propagation to ModelForms ---------------------------------+------------------------------------------ Reporter: Honza_Kral | Owner: Honza_Kral Status: new | Milestone: 1.2 Component: Forms | Version: SVN Resolution: | Keywords: newforms validation model modelform ep2008 Stage: Accepted | Has_patch: 1 Needs_docs: 1 | Needs_tests: 1 Needs_better_patch: 1 | ---------------------------------+------------------------------------------ Comment (by Honza_Kral):
Replying to [comment:65 sampablokuper]: > This might not be the right place to ask the question, but can anyone point me towards a document explaining the rationale under which Django's developers decided that: > > * most validation rules must be specified at the "forms" layer, although an a handful of them, e.g. max_length, can be specified at the model layer if desired > > rather than deciding that: > > * validation rules should ''all'' be specified at the "model" layer and bubble up from there, with the option to override them for specific forms if needed This was not decided, it just wasn't implemented. This ticked and the accompanying patch fixes that for you. After this ticket is resolved you should be able to define all your model validation on Models and only use form validation for some extra stuff or for forms that aren't ModelForms. And yes, this isn't exactly a good place to ask a question like this, try the django-dev mailing list if you want more information. -- Ticket URL: <http://code.djangoproject.com/ticket/6845#comment:67> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---