Hell guys, I have this little doubt:

I want to validate a form, but it has several different options. It
has to take a value_a and the see if it is bigger, smaller or equal to
another value_b. The issue (or maybe not :p) is that the value_b is
entered by the user, so it is always different, it would be perfect if
i can call that from my views.py but i just don't know how to come
with that.

here is my code:

    def clean_value(self):
        value_a = self.cleaned_data.get('value_a')
        if value_a > value_b:   <- i dunno how to call this if this
value b is on my views.py
            raise forms.ValidationError('value_a bigger than
value_b' )
        return value_a

Thank you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to