Re: help, I want restrict usernames available for registrion.

2009-04-29 Thread j0s390
After some time, I got IT... Thanks for your response. Hre is the solution I got, and yeah - it a Python problem (regular expression) from django import forms from django.forms.util import ErrorList import re class ExtraRegForm(forms.Form): username=forms.CharField(min_length=4, max_length=1

Re: help, I want restrict usernames available for registrion.

2009-04-29 Thread Karen Tracey
On Wed, Apr 29, 2009 at 10:01 AM, j0s390 wrote: > > I want all usernames to have at most two underscores and the > underscores not to be consercutive... > I tried this by creating an ExtraRegForm(models.Model) and putting > username=models.CharField(min_length=4, max_length=16) > and tried the va

help, I want restrict usernames available for registrion.

2009-04-29 Thread j0s390
I want all usernames to have at most two underscores and the underscores not to be consercutive... I tried this by creating an ExtraRegForm(models.Model) and putting username=models.CharField(min_length=4, max_length=16) and tried the validation process by using re.search to see if username meets