[TYPO3-mvc] validate EmailAddress throws error even if its empty

Domi djgarms at gmail.com
Wed Nov 14 08:45:48 CET 2012


Hello,

I validate one field with the @validate EmailAddress notation. The 
result is, that its not only throws the error if its a non-valid email 
address, also if its empty.

But the field shall remain empty. Is this a bug or a feature I don't 
know in the validation handling? I am using 4.7.6 and here is my domain 
model handling:


	/**
	 * sendEmailCopy
	 *
	 * @var string
      * @validate EmailAddress
	 */
	protected $sendEmailCopy;



	/**
	 * Returns the sendEmailCopy
	 *
	 * @return string sendEmailCopy
	 */
	public function getSendEmailCopy() {
		return $this->sendEmailCopy;
	}


	/**
	 * Sets the sendEmailCopy
	 *
	 * @param string $sendEmailCopy
	 * @return string sendEmailCopy
	 */
	public function setSendEmailCopy($sendEmailCopy) {
		$this->sendEmailCopy = $sendEmailCopy;
	}

Thanks!

Dominic


More information about the TYPO3-project-typo3v4mvc mailing list