So in the docs, it says one can set an initial value for form fields
via the initial attribute, e.g. from the docs:

class CommentForm(forms.Form):
...     name = forms.CharField(initial='Your name')
...     url = forms.URLField(initial='http://')
...     comment = forms.CharField()
f = CommentForm(auto_id=False)

The docs also state that the initial values will not be used as
fallback values during a form validation.

However, what I'm seeing is that when I actually do set
initial='http://' for a URLField, either in the field definition above
or via passing in a dictionary for dynamic initial values, if I then
submit/POST the form without changing the URLField, it gives an error
that the URL is invalid (of course 'http://' by itself is not a valid
URL).  Shouldn't the validation step know to ignore a form field value
if it's the same as the initial= value??


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