fuel/fuel/core/classes/validation.php
public function _validation_required_with($val, $field)
	{
		if ( ! $this->_empty($this->input($field)) and $this->_empty($val))
		{
			$validating = $this->active_field();
			throw new \Validation_Error($validating, $val, array('required_with' => array($this->field($field))), array($this->field($field)->label));
		}

		return true;
	}
public function _validation_required_with($val, $field)
	{
		if ( ! $this->_empty($this->input($field)) and $this->_empty($val))
		{
			$validating = $this->active_field();
			throw new \Validation_Error($validating, $val, array('required_with' => array($this->field($field))), array($this->field($field)->label));
		}

		return true;
	}
public function _validation_required_with ( $ val , $ field ) { if ( ! $ this -> _empty ( $ this -> input ( $ field ) ) and $ this -> _empty ( $ val ) ) { $ validating = $ this -> active_field ( ) ; throw new \ Validation_Error ( $ validating , $ val , array ( 'required_with' => array ( $ this -> field ( $ field ) ) ) , array ( $ this -> field ( $ field ) -> label ) ) ; } return true ; }
Conditionally requires completion of current field based on completion of another field

@param mixed
@param string
@return bool
Conditionally requires completion of current field based on completion of another field