Posted By

Meestercor on 05/22/08


Tagged

email textmate actionscript validation


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

jitendramr
sweetbabyyoung
danwade0
cesgra


Actionscript email validation


 / Published in: Other
 

  1. function is_valid_email(email:String):Boolean
  2. {
  3. var emailRgx:RegExp = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
  4. ///^[a-zA-Z0-9][-._a-zA-Z0-9]*@([a-zA-Z0-9]*.)+[a-zA-Z]{2,6}$/;
  5. trace(emailRgx.test(email));
  6. return emailRgx.test(email);
  7. }
  8. is_valid_email("[email protected]");

Report this snippet  

You need to login to post a comment.