Reputation: 21
Is there a way to validate email format in registration of account in Django?
I would like to allow users to only use gsfe accounts as their email when they are going to register in the app.
Upvotes: 1
Views: 298
Reputation: 733
You can use a UserSerializer
to check data, something like:
class UserSerializer(serializers.Serializer):
email = serializers.EmailField()
username = serializers.CharField(max_length=100)
You can also use Django Forms to create your registration form.
Upvotes: 2