Update email regex to match Rails
This commit is contained in:
parent
48b6e84013
commit
27fc84552d
|
@ -53,7 +53,7 @@
|
||||||
$('.combo_form').data('state', 'new');
|
$('.combo_form').data('state', 'new');
|
||||||
$('.combo_form').submit(function() {
|
$('.combo_form').submit(function() {
|
||||||
var errors = []
|
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'));
|
errors.push($('.email'));
|
||||||
$('.email_label').addClass('error', 500);
|
$('.email_label').addClass('error', 500);
|
||||||
$('.email').addClass('error', 500);
|
$('.email').addClass('error', 500);
|
||||||
|
|
Loading…
Reference in New Issue