#6652: [feature request] allow 'clean()' to specify the wrong field
---------------------------------------------------+------------------------
Reporter: Daniele Varrazzo <[EMAIL PROTECTED]> | Owner:
nobody
Status: new | Component:
django.newforms
Version: SVN | Resolution:
Keywords: | Stage:
Unreviewed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
---------------------------------------------------+------------------------
Changes (by Daniele Varrazzo <[EMAIL PROTECTED]>):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
An example of use:
{{{
def clean(self):
# Check the gateway is compatible with the address/mask
gateway = self.cleaned_data['gateway']
address = self.cleaned_data['address']
netmask = self.cleaned_data['netmask']
if not netconfig.addresses_match(address, gateway, netmask):
raise forms.ValidationError(
"Gateway not valid for the specified address",
field='gateway')
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/6652#comment:1>
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
-~----------~----~----~----~------~----~------~--~---