Phorm/Phorm.class.php
/**
	 * Returns true if all fields' data pass validation tests.
	 *
	 * @param boolean $reprocess if true (default: false), call all validators again
	 * @return boolean
	 */
Returns true if all fields' data pass validation tests.
@param boolean $reprocess if true (default: false), call all validators again
@return boolean
Returns true if all fields ' data pass validation tests . @param boolean $reprocess if true ( default : false ) call all validators again @return boolean
public function is_valid($reprocess=FALSE)
	{
		if( $reprocess || is_null($this->valid) )
		{
			if( $this->bound )
			{
				$this->valid = TRUE;
				foreach( $this->fields as $name => &$field )
				{
					if( !$field->is_valid($reprocess) )
					{
						$this->valid = FALSE;
					}
				}
				$this->get_errors();
			}
		}
		return $this->valid;
	}
public function is_valid ( $ reprocess = FALSE ) { if ( $ reprocess || is_null ( $ this -> valid ) ) { if ( $ this -> bound ) { $ this -> valid = TRUE ; foreach ( $ this -> fields as $ name => & $ field ) { if ( ! $ field -> is_valid ( $ reprocess ) ) { $ this -> valid = FALSE ; } } $ this -> get_errors ( ) ; } } return $ this -> valid ; }
Returns true if all fields' data pass validation tests.
Returns true if all fields ' data pass validation tests .
// Set up the errors array.