Skip to content

Commit

Permalink
#43 Use UniqueValidator in serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorcx committed Oct 2, 2019
1 parent 1e447cb commit 4e1b450
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class UserSignUpSerializer(serializers.Serializer):

email = serializers.EmailField(
required=True,
unique=True,
validators=[UniqueValidator(queryset=User.objects.all())],
#unique=True,
label="Email Address",
)

Expand Down

0 comments on commit 4e1b450

Please sign in to comment.