Hi,

I have a form that asks the registering user to choose a username. That 
form is a ModelForm based on the django.contrib.auth.models Users:

class usernameForm(forms.ModelForm):
    class Meta:
        model = User
        fields = ('username', )

The strange thing is that when it appears on the page it comes with the 
warning that says no more than 30 characters... but it actually does not 
check anything. I tried to enter whatever username, with spaces and () and 
in the view when I ask if form.is_valid() it returns True all the time!

Obviously this must be a mistake on my side somewhere but on such a simple 
setup I don't see where I am wrong, any idea welcome.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ohJ06taZ-DoJ.
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.

Reply via email to