About jhollingworth
a blog about my life (twitter.com/jhollingworth)
Feed Subscriptions
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;
}
