title: Validate a field depending on another field value in Symfony
body: <p>I have two related fields in a Symfony form: <code>object_status</code> and <code>cryopreservation_method</code>. </p>
  
  <p>The first one cannot be null and stores one of three possible choices: <code>liquid</code>, <code>solid</code> or <code>cryopreserved</code>.</p>
  
  <p>The second one should be only set if a record has its <code>object_status</code> set to <code>'cryopreserved'</code>. Otherwise it is <code>NULL</code>.</p>
  
  <p>How can I check this in the server side (not with Javascript) before saving the form? I have tried to check for null or empty values in model, but with no luck.</p>