title: Nullable custom form entity with Symfony
body: <p>My application manage families. One family consist of 1 or N members.</p>
  
  <p>I want the possibility to add one parent or two and 0 or N children. The children part works fine, but I have a hard time dealing with 1 or 2 parents.</p>
  
  <p>Here is my family form type: </p>
  
  <pre><code> $builder
          ... many attributes
          -&gt;add('parent1', MemberType::class)
          -&gt;add('parent2', MemberType::class)
  </code></pre>
  
  <p>Parent and parent2 are OneToOne association (Family to member). The member form type :</p>
  
  <pre><code> $builder
          -&gt;add('firstName', TextType::class, [
              'label' =&gt; 'Prénom',
              'constraints' =&gt; array(
                  new NotBlank(),
                  new Length(array('max' =&gt; 150))
              )
          ])
          ... many other attributes with choices or not
  </code></pre>
  
  <p>I thought of a checkbox that grey out the fields of the parent 2 if unchecked, but the member values are all required. Because of that SF2 does not validate my form. </p>
  
  <p>If I set required => false to these fields (in the builder) then the user will have the possibility to validate without filling everything (which I don't want).</p>
  
  <p>I'd like to create the following process :</p>
  
  <ul>
  <li>Either we fill all the fields of the member2 in order to validate the form</li>
  <li>Either we check a checkbox (single parent) and no field is required, and my final member2 will be null (or another solution)</li>
  </ul>