Index: t3lib/class.t3lib_tcemain.php =================================================================== --- t3lib/class.t3lib_tcemain.php (revision 5492) +++ t3lib/class.t3lib_tcemain.php (working copy) @@ -2064,6 +2064,9 @@ case 'alphanum_x': $value = preg_replace('/[^a-zA-Z0-9_-]/','',$value); break; + case 'email': + $set = t3lib_div::validEmail($value); + break; default: if (substr($func, 0, 3) == 'tx_') { $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func); Index: t3lib/jsfunc.evalfield.js =================================================================== --- t3lib/jsfunc.evalfield.js (revision 5492) +++ t3lib/jsfunc.evalfield.js (working copy) @@ -30,6 +30,7 @@ this.parseInt = evalFunc_parseInt; this.getNumChars = evalFunc_getNumChars; this.parseDouble = evalFunc_parseDouble; + this.parseEmail = evalFunc_email; this.noSpace = evalFunc_noSpace; this.getSecs = evalFunc_getSecs; this.getYear = evalFunc_getYear; @@ -241,6 +242,15 @@ } } } +function evalFunc_email(value) { + var apos = value.indexOf("@"); + var dotpos = value.lastIndexOf("."); + if (apos < 1 || dotpos - apos < 2) { + return ''; + } else { + return value; + } +} function evalFunc_input(type,inVal) { if (type=="md5") { return MD5(inVal); @@ -254,6 +264,9 @@ if (type=="double2") { return this.parseDouble(inVal); } + if (type=="email") { + return this.parseEmail(inVal); + } var today = new Date(); var add=0;