title: Django rest framework conditionally required fields
body: <p>I would like to write a <a href="http://www.django-rest-framework.org/api-guide/validators/#optional-fields" rel="noreferrer">drf validator</a> that will mark a field as required based on the value of an other field.
  For example:</p>
  
  <pre><code>class MySerializer(serializers.Serializer):
      has_children = fields.BooleanField()
      nb_childs = fields.IntegerField(min_value=1, validators=[RequiredIf(field='has_children', value=True)], required=False)
  </code></pre>
  
  <p>At first i believed the <a href="http://www.django-rest-framework.org/api-guide/validators/#class-based" rel="noreferrer">class based validator</a> was the way to do it, by retrieving the value of 'has_children' with a method like this:</p>
  
  <pre><code>def set_context(self, serializer_field):
      print serializer_field.parent.initial_data
  </code></pre>
  
  <p>but the 'initial_data' is not set. Any clue?</p>