Validate Custom Email Domains with Django-Registration
问题 I saw a version of JQuery EDU validation here but I'd love to use django-registraion to check a full domain @someschool.edu or @alumni.someschool.edu Any ideas? Thanks for your help. 回答1: You can create your own form in forms.py, you already have some example for : registration with term of service registration with unique mail registration without freeemail In your case add : class RegistrationFormEduMail(RegistrationForm): good_domains = ['edu'] def clean_email(self): email_domain = self