adapting regex for emailvalidation to accept single letter subdomains

This commit is contained in:
Klaus Leithoff 2009-02-04 07:57:30 +00:00
parent be859fa1f6
commit 964e28a3d8

View File

@ -61,7 +61,7 @@ class url_widget
*
* has to be used case insensitive: /i
*/
const EMAIL_PREG = '[a-z0-9][a-z0-9._-]*[a-z0-9]@([a-z0-9][a-z0-9_-]*[a-z0-9]\.)+[a-z0-9][a-z0-9_-]*[a-z0-9]';
const EMAIL_PREG = '[a-z0-9][a-z0-9._-]*[a-z0-9]@(([a-z0-9]*[a-z0-9]\.)|([a-z0-9][a-z0-9_-]*[a-z0-9]\.))+[a-z0-9][a-z0-9_-]*[a-z0-9]';
/**
* pre-processing of the extension