#6652: [feature request] allow 'clean()' to specify the wrong field
------------------------------------------------+---------------------------
Reporter: Daniele Varrazzo <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: django.newforms
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
------------------------------------------------+---------------------------
Currently the {{{Form.clean()}}} method has no way to specify which field
is invalid, but it's the only place where validation involving many
fields can be accomplished. Taking your example in the documentation:
''This is where you might put in things to check that if field A is
supplied, field B must contain a valid email address and the like. ''
If the field B doesn't contain a valid email address, the error message
should appear next to the B widget, not at the top of the form.
An easy fix is to add a 'field' optional attribute to the
{{{ValidationError}}} and use it if provided. I already used this method
in other programs of mine (my exception class was called
{{{ValidationError}}} too!)
--
Ticket URL: <http://code.djangoproject.com/ticket/6652>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---