Posted By

yanek1988 on 03/03/11


Tagged

js filters


Versions (?)

js filters


 / Published in: JavaScript
 

  1. function checkEmail(v) {
  2. var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  3. return !filter.test(v) ? false : true;
  4. }
  5. function checkDate_yyyyMMdd(v) {
  6. var filter = /^(19|20)\d\d([- \.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$/
  7. return !filter.test(v) ? false : true;
  8. }

Report this snippet  

You need to login to post a comment.