Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

blocking certain email addresses

 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this script with me that blocks any others address except the one that belong to 'xyz.zom.com' domain ... now i want to block certain email address belonging to this domain .. like for eg. i want to block an entry if it's "aa@xyz.zom.com","bb@xyz.zom.com " and so on...!! what addition do i have to make to the following script...?
<script LANGUAGE="JavaScript">
function TestEmail(StrT)
{
var StrRE = /^[\w.]{1,}@xyz.zom.com$/;
var xyz= "@xyz.zom.com";
if(StrT.match(StrRE))
{
return StrT;
}
else
{
alert('Invalid email address entered. The format of Email ID is emailid@xyz.zom.com);
return xyz;
}
}
</script>

???
Thanks...
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Replies...? :roll:
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is like
var StrRE = /^[\w.]{1,}@(abc|cde|asd|cdf).zom.com$/
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanxssss a lot .... it worked..!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic