def validate_username(self, value):
try:<EOL><INDENT>self.user = User.objects.get(username=value)<EOL><DEDENT>except User.DoesNotExist:<EOL><INDENT>raise serializers.ValidationError("<STR_LIT>")<EOL><DEDENT>return value<EOL>
Verify that the username has a matching user.