Reply
problems validating email address
Old 09-09-2007, 10:56 PM problems validating email address
Experienced Talker

Posts: 36
hey all. i'm trying to validate the user inputted email address for www.eddiewalter.com/staging/free-pre-approval.aspx with the following code and it doesn't seem to be working.

Code:
 
 
<asp:RegularExpressionValidator runat="server" id="regexpEmail" ControlToValidate="email"  ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$ " ErrorMessage = "Your email must be in the format: username@domain.com" Display="Dynamic" />
i've taken that validation tag out of the page because it wouldn't work. any ideas?
edzdallas79 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 09-10-2007, 08:19 AM Re: problems validating email address
chrishirst's Avatar
Super Moderator

Posts: 11,466
Location: Blackpool. UK
And "wouldn't work" means what exactly??
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-10-2007, 01:33 PM Re: problems validating email address
Experienced Talker

Posts: 36
yeah i know. i'm not always good at descriptive descriptions. =)

when i clicked the submit button, it would not validate the email address as valid even when it was a valid email address. i solved it by changing the name of the textbox from "email" to "email2"
edzdallas79 is offline
Reply With Quote
View Public Profile
 
Old 10-12-2007, 07:53 PM Re: problems validating email address
ara
Super Talker

Posts: 133
Name: Kristofer
Quote:
Originally Posted by edzdallas79 View Post
yeah i know. i'm not always good at descriptive descriptions. =)

when i clicked the submit button, it would not validate the email address as valid even when it was a valid email address. i solved it by changing the name of the textbox from "email" to "email2"
Nice solution, but i dont think the name of the textbox is the problem ;-)
ara is offline
Reply With Quote
View Public Profile Visit ara's homepage!
 
Old 10-15-2007, 03:08 AM Re: problems validating email address
chrishirst's Avatar
Super Moderator

Posts: 11,466
Location: Blackpool. UK
Quote:
Originally Posted by ara View Post
Nice solution, but i dont think the name of the textbox is the problem ;-)
Well, since it cured the problem, it obviously was!

email may be a reserved word in the .net validator code
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to problems validating email address
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15097 seconds with 13 queries