I have a model serializer for changing the email and password.
class ChangeEmailSerializer(ModelSerializer):
class Meta:
model = CustomUser
fields = ['email', 'password']
def update(self, instance, validated_data):
instance.email = validated_data.get('email')
return super().save_instance(instance)
How do I combine the a field error from EmailField with a non field error from the validate function used to check the user password?