dependant validation in django rest framework

anyone have an idea, how to validate dependent fields in Django rest framework?
I am trying this method but it is not working for me.

def validate(self,data):
        user_is = data.get('useris')
        sector__type = data.get('sector_type')

        if user_is == '0':
            if sector__type == '0':
                raise serializers.ValidationError({'sector_type':'Must select sector type'})
        return data

Can you elaborate more, like what you you really trying to achieve here.

as you can see in code sector_type field is depended on user_is field,i want to raise an error in sector_type field whenever user_is field has specific value, that i want to do, dependent field validation in django rest framework(serializer), but this way it is not showing any error

print the values of user_is and sector_type and then see the values what are you really getting before if condition.