From 27fc84552dca6f9258cda4f43a71b665eba31f2e Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sat, 5 Mar 2011 08:46:26 -0800 Subject: [PATCH] Update email regex to match Rails --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 74f8b16..8e3d50e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -53,7 +53,7 @@ $('.combo_form').data('state', 'new'); $('.combo_form').submit(function() { var errors = [] - if(!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]+$/.test($('.email').val())) { + if(!/[\w.!#\$%+-]+@[\w-]+(?:\.[\w-]+)+/.test($('.email').val())) { errors.push($('.email')); $('.email_label').addClass('error', 500); $('.email').addClass('error', 500);