Fix bug in regex

This commit is contained in:
Erik Michaels-Ober 2011-03-06 23:56:55 -08:00
parent 6027e5c6f9
commit 428995778d
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@
$('.combo_form').data('state', 'user_new');
$('.combo_form').submit(function() {
var errors = []
if(!/\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i.test($('#user_email').val())) {
if(!/[\w\.%\+\-]+@[\w\-]+\.+[\w]{2,}/.test($('#user_email').val())) {
errors.push($('#user_email'));
$('#user_email_label').addClass('error', 500);
$('#user_email').addClass('error', 500);