* @author Marcus Lunzenauer * @author Martin Gieseking * @license GPL2 or any later version */ class DataFieldEmailEntry extends DataFieldEntry { protected $template = 'email.php'; /** * Returns whether the datafield contents are valid * * @return boolean indicating whether the datafield contents are valid */ public function isValid() { return parent::isValid() && (!$this->getValue() || filter_var($this->getValue(), FILTER_VALIDATE_EMAIL)); } }