Hi,
I'm building register form using UserCreationForm.
I have simple form:
class RegisterCustomerForm(UserCreationForm):
def __init__(self, *args, **kwargs):
super(RegisterCustomerForm, self).__init__(*args, **kwargs)
self.fields['email'].required = True
self.fields['email'].label = _(u'Email')
self.fields['username'].label = _(u'Login')
self.fields['first_name'].required = True
self.fields['last_name'].required = True
required_css_class = 'required'
error_css_class = 'error'
address = forms.CharField(max_length=255, min_length=10, required=True)
telephone = forms.CharField(max_length=30, required=True)
class Meta():
model = User
fields = ('email','first_name','last_name',)
Now I want to make a custom validation of email field.
I want to make it by function def clean_field
How can I get access to email field?
--
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.