gump.class.php
protected function validate_required_file($field, $input, $param = null)
      {
          if (!isset($input[$field])) {
              return;
          }

          if (is_array($input[$field]) && $input[$field]['error'] !== 4) {
              return;
          }

          return array(
              'field' => $field,
              'value' => $input[$field],
              'rule' => __FUNCTION__,
              'param' => $param,
          );
      }
protected function validate_required_file($field, $input, $param = null)
      {
          if (!isset($input[$field])) {
              return;
          }

          if (is_array($input[$field]) && $input[$field]['error'] !== 4) {
              return;
          }

          return array(
              'field' => $field,
              'value' => $input[$field],
              'rule' => __FUNCTION__,
              'param' => $param,
          );
      }
protected function validate_required_file ( $ field , $ input , $ param = null ) { if ( ! isset ( $ input [ $ field ] ) ) { return ; } if ( is_array ( $ input [ $ field ] ) && $ input [ $ field ] [ 'error' ] !== 4 ) { return ; } return array ( 'field' => $ field , 'value' => $ input [ $ field ] , 'rule' => __FUNCTION__ , 'param' => $ param , ) ; }
Checks if a file was uploaded.

Usage: '<index>' => 'required_file'

@param  string $field
@param  array $input

@return mixed
Checks if a file was uploaded .