public function setError($errorName, $errorNameIndex = null, $message = null) {

		if(is_null($errorNameIndex)) {
			$this->formErrors[$errorName] = new FormError($message);
		}
		else {
			$this->formErrors[$errorName][$errorNameIndex] = new FormError($message);
		}

		return $this;

	}
public function setError($errorName, $errorNameIndex = null, $message = null) {

		if(is_null($errorNameIndex)) {
			$this->formErrors[$errorName] = new FormError($message);
		}
		else {
			$this->formErrors[$errorName][$errorNameIndex] = new FormError($message);
		}

		return $this;

	}
public function setError ( $ errorName , $ errorNameIndex = null , $ message = null ) { if ( is_null ( $ errorNameIndex ) ) { $ this -> formErrors [ $ errorName ] = new FormError ( $ message ) ; } else { $ this -> formErrors [ $ errorName ] [ $ errorNameIndex ] = new FormError ( $ message ) ; } return $ this ; }
add custom error and force error message in template

@param string $errorName
@param mixed $errorNameIndex
@param string message

@return HtmlForm
add custom error and force error message in template