Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form validation exclude domains

Status
Not open for further replies.

ZimZ

IS-IT--Management
Joined
Oct 27, 2001
Messages
3
Location
NL
Hi,

I'm using this expression to validate e-mail addresses:

<asp:RegularExpressionValidator ControlToValidate=&quot;txtTo&quot; Display=&quot;Dynamic&quot; ErrorMessage=&quot;Please enter a valid e-mail address.&quot; id=&quot;FromValidator1&quot; runat=&quot;server&quot; ValidationExpression=&quot;^([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])$&quot;></asp:RegularExpressionValidator>

What I want to do now is also to exclude domains like hotmail.com, yahoo.com, etc.

Can you point me in the right direction?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top