ModuleSettings.aspx - Author E-mail js validation not working

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/25/2005 3:29:17 AM
Gravatar
Total Posts 2

ModuleSettings.aspx - Author E-mail js validation not working

Hello all...

I've started to try out mojoPortal... very cool!  As I was trying it out, I found the following bug in the Admin/ModuleSettings.aspx page.  Any e-mail you address you enter in Author Email: field is marked invalid when you leave the text box's focus area.  Even the one that is there by default (blogauthor@yourportal.com) isn't interpreted as valid.

Take care,

Andrew Koransky

3/25/2005 5:20:57 AM
Gravatar
Total Posts 18439

Re: ModuleSettings.aspx - Author E-mail js validation not working

Hi Andrew,

I'm not seeing that on this site running mono 1.1.4, it could be a bug in the version of mono you are using.

What version of mono are you using?

Thanks,

Joe

3/28/2005 1:48:12 AM
Gravatar
Total Posts 2

Re: ModuleSettings.aspx - Author E-mail js validation not working

Hi Joe...

Thanks for your response.  I am not running Mono.  I'm running WinXP with all the latest .NET and system service packs installed.  What's wierd is that this only appears to happen on that particular page.  Are you using the same technique on other pages that validate e-mail addresses?

Thanks for your work on this.  The concept is great.

Take care,

Andrew

5/9/2005 12:27:01 PM
Gravatar
Total Posts 38

Re: ModuleSettings.aspx - Author E-mail js validation not working

Is it possible that the email validation regx is missing some specific formats?

I added this to allow for all types. It is a bit long one of my many Google searches:

StringBuilder objString = new StringBuilder();
???objString.Append("(?:(?:\\r\\n)?[ \\t])*(?:(?:(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t]");
???objString.Append(")+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:");
???objString.Append("\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(");
???objString.Append("?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ ");
???objString.Append("\\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*))*@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\0");
???objString.Append("31]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\");
???objString.Append("](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+");
???objString.Append("(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:");
???objString.Append("(?:\\r\\n)?[ \\t])*))*|(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z");
???objString.Append("|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)");
???objString.Append("?[ \\t])*)*\\<(?:(?:\\r\\n)?[ \\t])*(?:@(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\");
???objString.Append("r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[");
???objString.Append(" \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)");
???objString.Append("?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t]");
???objString.Append(")*))*(?:,@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[");
???objString.Append(" \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*");
???objString.Append(")(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t]");
???objString.Append(")+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*)");
???objString.Append("*:(?:(?:\\r\\n)?[ \\t])*)?(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+");
???objString.Append("|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r");
???objString.Append("\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:");
???objString.Append("\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t");
???objString.Append("]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*))*@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031");
???objString.Append("]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](");
???objString.Append("?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?");
???objString.Append(":(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?");
???objString.Append(":\\r\\n)?[ \\t])*))*\\>(?:(?:\\r\\n)?[ \\t])*)|(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?");
???objString.Append(":(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?");
???objString.Append("[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)*:(?:(?:\\r\\n)?[ \\t])*(?:(?:(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] ");
???objString.Append("\\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|");
???objString.Append("\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>");
???objString.Append("@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|");
???objString.Append(Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*))*@(?:(?:\\r\\n)?[ \\t]");
???objString.Append(")*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\");
???objString.Append("" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?");
???objString.Append(":[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[");
???objString.Append("\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*|(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-");
???objString.Append("\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(");
???objString.Append("?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)*\\<(?:(?:\\r\\n)?[ \\t])*(?:@(?:[^()<>@,;");
???objString.Append(":\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([");
???objString.Append("^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\");
???objString.Append(Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\");
???objString.Append("]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*(?:,@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\");
???objString.Append("[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\");
???objString.Append("r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] ");
???objString.Append("\\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]");
???objString.Append("|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*)*:(?:(?:\\r\\n)?[ \\t])*)?(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\0");
???objString.Append("00-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\");
???objString.Append(".|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,");
???objString.Append(";:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?");
???objString.Append(":[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*))*@(?:(?:\\r\\n)?[ \\t])*");
???objString.Append("(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".");
???objString.Append("\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t])*(?:[");
???objString.Append("^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]");
???objString.Append("]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*\\>(?:(?:\\r\\n)?[ \\t])*)(?:,\\s*(");
???objString.Append("?:(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\");
???objString.Append("" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(");
???objString.Append("?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[");
???objString.Append("\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t");
???objString.Append("])*))*@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t");
???objString.Append("])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?");
???objString.Append(":\\.(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|");
???objString.Append("\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*|(?:");
???objString.Append("[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\");
???objString.Append("]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)*\\<(?:(?:\\r\\n)");
???objString.Append("?[ \\t])*(?:@(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[");
???objString.Append(Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)");
???objString.Append("?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>");
???objString.Append("@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*(?:,@(?:(?:\\r\\n)?[");
???objString.Append(" \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,");
???objString.Append(";:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:\\r\\n)?[ \\t]");
???objString.Append(")*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\");
???objString.Append("" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*)*:(?:(?:\\r\\n)?[ \\t])*)?");
???objString.Append("(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".");
???objString.Append("\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])*)(?:\\.(?:(?:");
???objString.Append("\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z|(?=[\\[");
???objString.Append("" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|" + Convert.ToChar(34) + "(?:[^\\" + Convert.ToChar(34) + "\\r\\\\]|\\\\.|(?:(?:\\r\\n)?[ \\t]))*" + Convert.ToChar(34) + "(?:(?:\\r\\n)?[ \\t])");
???objString.Append("*))*@(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])");
???objString.Append("+|\\Z|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*)(?:\\");
???objString.Append(".(?:(?:\\r\\n)?[ \\t])*(?:[^()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t])+|\\Z");
???objString.Append("|(?=[\\[" + Convert.ToChar(34) + "()<>@,;:\\\\" + Convert.ToChar(34) + ".\\[\\]]))|\\[([^\\[\\]\\r\\\\]|\\\\.)*\\](?:(?:\\r\\n)?[ \\t])*))*\\>(?:(");
???objString.Append("?:\\r\\n)?[ \\t])*))*)?;\\s*)");
???Regex regx = new Regex(objString.ToString());
???return regx.IsMatch(strEmail);
5/9/2005 1:13:29 PM
Gravatar
Total Posts 18439

Re: ModuleSettings.aspx - Author E-mail js validation not working

Yikes! Thats way more complex than needed I don't know how anyone could read that or troubleshoot it. I have never been able to reproduce the problem posted in this thread. I suspect that he is missing the regex expression in the mp_ModuleSettings table. When you add a blog to a page it creates rows in mp_ModuleSettings based on what is in mp_ModuleDefinitionSettings. I suspect data is either missing or incorrect in one of these. In my db I have

^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\\w]*[0-9a-zA-Z])*\\.)+[a-zA-Z]{2,9})$

and I have never had any problems with it.

5/21/2005 9:50:24 AM
Gravatar
Total Posts 18439

Re: ModuleSettings.aspx - Author E-mail js validation not working

Strange! I was previously unable to reproduce this error but while adding some module settings to the blog for Editor Width and Height it suddenly started happening for me.

The regular expression for the validator is stored in the db in the mp_ModuleDefinitionSettings and mp_ModuleSettings tables.

I changed it to:

^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$

and that solved the problem.
6/2/2005 2:51:53 PM
Gravatar
Total Posts 18439

Re: ModuleSettings.aspx - Author E-mail js validation not working

this is fixed as of release 20050530
You must sign in to post in the forums. This thread is closed to new posts.