allow "." in front-part of rfc822 email, eg. "1. company <info@first-company.com>"

This commit is contained in:
Ralf Becker 2014-01-16 15:14:45 +00:00
parent 0d630f41b2
commit 4b789c932d
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class etemplate_widget_url extends etemplate_widget
/**
* Regexes for validating
*/
const EMAIL_PREG = '^(?:[ a-z0-9!#$%&\'*+\/=?^_`{|}\(\)~-]+<)?[^\x00-\x20()<>@,;:\"\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}';
const EMAIL_PREG = '^(?:[ a-z0-9.!#$%&\'*+\/=?^_`{|}\(\)~-]+<)?[^\x00-\x20()<>@,;:\"\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}';
/**
* Validate input

View File

@ -33,7 +33,7 @@ var et2_url = et2_textbox.extend(
// PREG for client-side validation copied from etemplate_widget_url
// using \042 instead of " to NOT stall minifyer!
EMAIL_PREG: new RegExp(/^(?:[ a-z0-9!#$%&'*+/=?^_`{|}\(\)~-]+<)?[^\x00-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}/i),
EMAIL_PREG: new RegExp(/^(?:[ a-z0-9.!#$%&'*+/=?^_`{|}\(\)~-]+<)?[^\x00-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}/i),
/**
* @memberOf et2_url
*/