Log in | Jump |

jhollingworth

a blog about my life (twitter.com/jhollingworth)
This thing was constructed on March 5, 2010, and it was categorized as Uncategorized.
You can follow comments through the RSS 2.0 feed. You can leave a comment, or trackback.

AsĀ Huddle grows we start to see more and more of the edge cases of the world. One bug I had to fix to our email regexp so that it would support single letter domains. Up until now we have been using Haaked’s regex which has been us well however it doesn’t validate single letter domains so we needed a better solution.

The solution was pretty stupidly simple actually, the .net framework already supports email validation!


try
{
   new MailAddress("foo@huddle.net");
   return true;
catch
{
   return false;
}
This thing was constructed by .


You can follow comments through the RSS 2.0 feed. You can leave a comment, or trackback.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*