Phorm/Phorm.class.php
/**
	 * Outputs errors for all fields, with an optional prefix and suffix so you can wrap them in HTML elements.
	 * Note that if a field has multiple errors, only one of them will be displayed (the last one in the validation array).
	 *
	 * @param string $prefix string that will be inserted before each error message (e.g. <li>)
	 * @param string $suffix string that will be inserted after each error message (e.g. </li>)
	 * @return void
	 */
Outputs errors for all fields, with an optional prefix and suffix so you can wrap them in HTML elements.
Note that if a field has multiple errors, only one of them will be displayed (the last one in the validation array).

@param string $prefix string that will be inserted before each error message
@param string $suffix string that will be inserted after each error message
@return void
Outputs errors for all fields with an optional prefix and suffix so you can wrap them in HTML elements . Note that if a field has multiple errors only one of them will be displayed ( the last one in the validation array ) . @param string $prefix string that will be inserted before each error message @param string $suffix string that will be inserted after each error message @return void
public function display_errors($prefix = '', $suffix = '')
	{	
		$nested_errors = $this->get_errors();
		foreach ($nested_errors as $field_name => $field_error)
		{
			echo $prefix;
			echo $this->$field_name->label(false) . ': ' . $field_error[1];
			echo $suffix;
		}
	}
public function display_errors ( $ prefix = '' , $ suffix = '' ) { $ nested_errors = $ this -> get_errors ( ) ; foreach ( $ nested_errors as $ field_name => $ field_error ) { echo $ prefix ; echo $ this -> $ field_name -> label ( false ) . ': ' . $ field_error [ 1 ] ; echo $ suffix ; } }
Outputs errors for all fields, with an optional prefix and suffix so you can wrap them in HTML elements.
Outputs errors for all fields with an optional prefix and suffix so you can wrap them in HTML elements .