HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Email ValidationexpressionEmail Validationexpression
Previous
 
Next
New Post
2/13/2007 5:07 AM
 

Has anyone found the way to change Email ValidationExpression yet?
I'm having the same problem now.....
The email filed doesn't accept "-" in the email address before @.


There is no email item in "Manage Profile Properties" edit.
I tried to modify the code in \controls\user.ascx, set the  regularexpressionvalidator enabled="false" but didn't change anything.

 
New Post
2/13/2007 10:02 AM
 

This can be done in UserInfo class (it is an attribute of the property) - you will need to recompile the Library project.

And in 4.4.1 it should accept "-" in the name.

        RegularExpressionValidator("\b[a-zA-Z0-9._%-+']+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b")> _


Charles Nurse
DotNetNuke Trustee,
Senior Architect, DotNetNuke Coporation
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
See my Blog for Articles on .NET, DNN and Module Development

View my Blog
 
New Post
2/13/2007 7:42 PM
 

Thank you so much Charles, I was so glad when I saw your reply this morning. :D
I'm using DNN4.4.1 and with your help I found the RegularExpressionValidation String in UserInfo class in the Library, it is exactly as you post:

\b[a-zA-Z0-9._%-+']+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b

But it really doesn't accept email like kbc-a@mycompanyname.com

Maybe it's becasue of the "-" has special meaning in regular expression, so that is the only character in  [] that doesn't work, so I added a "\" in front of it as:

\b[a-zA-Z0-9._%\-+']+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b

And it works now!!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Email ValidationexpressionEmail Validationexpression


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.