On 11/4/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> That seems to be a silly question now. I have another related
> question regarding type of "self.cleaned_data['guess_the_number']",
> string or integer or float?
In general it depends on the type of field. In this case it's a RegExField,
so
That seems to be a silly question now. I have another related
question regarding type of "self.cleaned_data['guess_the_number']",
string or integer or float?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
>
> def clean_guess_the_number(self):
> if self.max_number > self.cleaned_data['guess_the_number']:
Change that to:
if self.max_number < self.cleaned_data['guess_the_number']:
> raise forms.ValidationError('Your Number have to be lower
> or equal to Max Number.')
>
On 11/3/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> Validation checks the number entered by the user is between the range
> and this check is done in "def clean_guess_the_number". This is not
> working.
>
> Seems like "def clean_guess_the_number(self)" never executed when you
> post the data and
Validation checks the number entered by the user is between the range
and this check is done in "def clean_guess_the_number". This is not
working.
Seems like "def clean_guess_the_number(self)" never executed when you
post the data and when form.is_valid() called.
class GuessForm(forms.Form):
5 matches
Mail list logo