So i change pwd and pwdc to required=False and in clean i do if pwd in data (or if ["pwd"] not in data): if data.get("pwd") != data.get("pwdc"): raise forms.ValidationError("Passwords do not match") return data
and i get errorfree clean function? Alan On Jun 8, 4:29 pm, Michael <newmani...@gmail.com> wrote: > On Mon, Jun 8, 2009 at 2:05 AM, zayatzz <alan.kesselm...@gmail.com> wrote: > > > Great :). Thanks... > > > Wish i had read your post more thoroughly the first time. > > > This takes care of my second problem, but what about the first one - > > why do password fields need to be filled? Because empty(or nonexisting > > data) fields cannot be compared in 2nd if ? > > > Then what is the syntax for making sure if fields exist in post data? > > Fields are by default required. If you want them to be optional, you'll have > to pass required=False in the field signature. Take a look > at:http://docs.djangoproject.com/en/dev/ref/forms/fields/#required > > Also for the last issue, here are the > docs:http://docs.djangoproject.com/en/dev/ref/forms/validation/ > > Hope that helps, > > Michael --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---