Sorry, accidentally hit the submit button.

Here's your example finished (don't forget self in the def!):

def clean_lines(self):
    if not format_is_correct( lines ):
        raise forms.ValidationError('Bug..')
    return self.cleaned_data.get(lines)

Good luck!
- whiteinge


On Jun 22, 4:54 pm, Mario Gonzalez <[EMAIL PROTECTED]> wrote:
> Hello, I've got a model like:
>
> class RecepcionForm(forms.Form):
>         drivers =
> forms.ModelChoiceField(queryset=Driver.objects.all().order_by('-
> name'))
>         lines = forms.CharField()
>
>        def clean_lines():
>               if not format_is_correct( lines ):
>                      raise forms.ValidationError('Bug..')
>
>  "lines" is a string with a special format, ex: "23, 24,1,0"  and I
> want to validate it with clean(), I've been reading the documentation
> and writing some lines but I think my English is not good enough.
>
>     Can you help me? Regards!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to