title: Symfony2 validation filters
body: <p>In my Symfony 2 application I need to filter input before passing it on to validation [1], however, I can't seem to find any system within Symfony to do this.</p>
  
  <p>The type of filtering I looking for is e.g. to be able to filter a dash out of a specific field before validating it. E.g. users can enter <code>123-123</code> but the only accepted value is <code>123123</code>. Just as I can set up validation rules with constraints, I'm looking for something similar for filters.</p>
  
  <p>[1] <a href="http://symfony.com/doc/current/book/validation.html" rel="nofollow">http://symfony.com/doc/current/book/validation.html</a></p>