private function insertErrorMessages() {

		$rex = '/\{(?:\w+\|)*error_%s(?:\|\w+)*:([^\}]+)\}/i';

		foreach($this->formErrors as $name => $v) {
			if(!is_array($v)) {
				$this->html = preg_replace(
					sprintf($rex, $name),
					'$1',
					$this->html
				);
			}
			else {
				foreach(array_keys($this->formErrors[$name]) as $ndx) {
					$this->html = preg_replace(
						sprintf($rex, $name),
						empty($this->formErrors[$name][$ndx]) ? '' : '$1',
						$this->html,
						1
					);
				}
			}
		}
		
		return $this;

	}
private function insertErrorMessages() {

		$rex = '/\{(?:\w+\|)*error_%s(?:\|\w+)*:([^\}]+)\}/i';

		foreach($this->formErrors as $name => $v) {
			if(!is_array($v)) {
				$this->html = preg_replace(
					sprintf($rex, $name),
					'$1',
					$this->html
				);
			}
			else {
				foreach(array_keys($this->formErrors[$name]) as $ndx) {
					$this->html = preg_replace(
						sprintf($rex, $name),
						empty($this->formErrors[$name][$ndx]) ? '' : '$1',
						$this->html,
						1
					);
				}
			}
		}
		
		return $this;

	}
private function insertErrorMessages ( ) { $ rex = '/\{(?:\w+\|)*error_%s(?:\|\w+)*:([^\}]+)\}/i' ; foreach ( $ this -> formErrors as $ name => $ v ) { if ( ! is_array ( $ v ) ) { $ this -> html = preg_replace ( sprintf ( $ rex , $ name ) , '$1' , $ this -> html ) ; } else { foreach ( array_keys ( $ this -> formErrors [ $ name ] ) as $ ndx ) { $ this -> html = preg_replace ( sprintf ( $ rex , $ name ) , empty ( $ this -> formErrors [ $ name ] [ $ ndx ] ) ? '' : '$1' , $ this -> html , 1 ) ; } } } return $ this ; }
insert error messages into template
placeholder for error messages are replaced

@return HtmlForm
insert error messages into template placeholder for error messages are replaced