title: Symfony2.3 Required entity property, not requird in form, how do I default the property dynamically?
body: <p>In Symfony2.3, I'm trying to configure an entity to do as follows</p>
  
  <p>Example is a basic page entity.</p>
  
  <p>I have two properties.</p>
  
  <pre><code>/**
   *@ORM\Column(type="string",length=255)
   *@Assert\NotBlank()
   */
  protected $slug;
  
  /**
  *set slug
  *@return Campaign
  */
  protected $slug;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public function setSlug($slug)
  {
      // if slug is false or empty, use the title instead
      if ($slug == '' || $slug == false)
      {
          $slug = $this-&gt;getTitle();
      }
      $slug = preg_replace('/[\s-]+/', '-', trim($slug," -\t\n\r\0\x0B"));
      $slug = preg_replace('/[^a-z0-9-]/', '', strtolower($slug) );
      $this-&gt;slug = $slug;
      return $this;
  }
  </code></pre>
  
  <p>Although Slug Is required in the entity, it's not required in the form. I don't want it to be required in the form as it should default to the title if not filled in. Other than manually checking for it and calling this in the controller if it's not filled in, is there a better more automated way form the form configuration?</p>