title: Email validation solution for front and backend
body: <p>We have to do email validation and there are a large number of solution. The email is not the primary email we are using across site so we are not planning on sending a email and verifying the account. Hence we we are relying on regex based validation solution. </p>
  
  <p>Now doing regex based validation in server-side(java) is generally discouraged and we are advised to use existing solution like <a href="http://commons.apache.org/proper/commons-validator/javadocs/api-1.4.0/org/apache/commons/validator/routines/EmailValidator.html" rel="nofollow">EmailValidator</a> or existing libraries. Now the problem is to achieve consistency between front end validation(which would be regex based and implemented in javascript) and backend implementation (which will be in java).</p>
  
  <p>Is there a solution to achieve consistency between these validation on front-end and backend automatically.</p>