my_proposal_delivery_type = serializers.SlugRelatedField(many=False,
    read_only=False, slug_field='delivery_type')
my_survey_method = serializers.SlugRelatedField(many=False, read_only=False,
    slug_field='method')


class Meta:
    model = diliModels.Proposal
fields = ('id', 'my_proposal_side', 'my_proposal_type',
    'number_of_participants', 'cost_per_participants',
    'minimum_dollar_commitment', 'commercial_terms', 'is_publicly_visible',
    'is_anonymous', 'is_republish', 'name', 'my_delivery_type',
    'my_survey_method', 'number_of_unique_contacts', 'availability_start',
    'availability_end', 'location_country', 'location_city',
    'location_state', 'description', 'desired_meetings')

def validate(self, attrs):
    raise serializers.ValidationError('error')
return attrs
How to validate a model in django rest framework?