Example #1
0
    def clean_email(self):
        email = self.cleaned_data['email']
        if does_email_exist(email):
            raise forms.ValidationError(m.email_already_registered)

        if email[-len(".edu"):] != ".edu":
            raise forms.ValidationError(m.must_be_edu_email)
        return self.cleaned_data['email']
Example #2
0
 def clean_email(self):
       email = self.cleaned_data['email']
       if does_email_exist(email):
            raise forms.ValidationError(m.email_already_registered)
                                                                      
       if email[-len(".edu"):] != ".edu":
            raise forms.ValidationError(m.must_be_edu_email)
       return self.cleaned_data['email']
Example #3
0
 def clean_email(self):
     email = self.cleaned_data['email']
     
     if does_email_exist(email):
         raise forms.ValidationError(_(m.email_already_registered))
     
     if s.DEBUG:
         if email[-len(".edu"):] != ".edu" and email[-len("umeqo.com"):] != "umeqo.com":
             raise forms.ValidationError(_(m.must_be_edu_email))
     elif email[-len(".edu"):] != ".edu":
         raise forms.ValidationError(_(m.must_be_edu_email))
     return self.cleaned_data['email']
Example #4
0
    def clean_email(self):
        email = self.cleaned_data['email']

        if does_email_exist(email):
            raise forms.ValidationError(_(m.email_already_registered))

        if s.DEBUG:
            if email[-len(".edu"):] != ".edu" and email[
                    -len("umeqo.com"):] != "umeqo.com":
                raise forms.ValidationError(_(m.must_be_edu_email))
        elif email[-len(".edu"):] != ".edu":
            raise forms.ValidationError(_(m.must_be_edu_email))
        return self.cleaned_data['email']