title: Custom validation in symfony2
body: <p>I am new to symfony. I have decided to move my wheel with Symfony version 2. </p>
  
  <p>In my user form:</p>
  
  <ul>
  <li>I would like to validate uniqueness of email in the database  .</li>
  <li>I would like to also validate password with confirm password field . </li>
  <li>I could find any help in the symfony2 doc.</li>
  </ul>