title: Validate email format and uniqueness against DB
body: <p>I am creating a JSF form where I have an email field. I need to validate the email format and check for uniqueness against DB.</p>
  
  <p>I need to check this when the enduser has entered the email field. If it's present in the DB, then we need to change the field color to red and otherwise to green. I would like to perform this by ajax.</p>
  
  <p>I have seen examples in PHP, but it's not clear to me how to do it in JSF.</p>