Hi all:
When I use ModelForm like this:
models:
visa= models.CharField('visa',max_length=1,choices=(('1','yes'),
('2','no')))
visatype =
models.CharField('visatype',max_length=1,null=True,blank=True,
choices=(('1','l'),
('2','m')),validator_list=[validators.RequiredIfOtherFieldEquals('visa','1')])
view:
if form.is_valid():
form.save()
return HttpResponseRedirect('/info/status/')
but when visatype is not valid,there is nothing error...what can I do?
I'm something wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---