Actionscript email validation


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.