On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jan 31, 1:19 pm, "MerMer" <[EMAIL PROTECTED]> wrote: > > I have a form where a user needs to enter a 8 digit code. I want to > > check the user's input against a database and return an error if the > > code has already been entered by another user. > > > > If I use New Forms, do I need to write a custom Field to do this > > validation? > > No, just implement your clean_YOURFIELDNAME method of the form.
A clarification to Lorenzo's response: You can either implement a custom Field class *or* implement a clean_* method. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---