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 the above standards and I failed.
Please help me...
from django import forms
import re
class ExtraRegForm(models.Model)
username=models.CharField(min_length=4, max_length=16)
def clean(self):
# the check here (by regular expression or other)
Help if you can....
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---