gump.class.php
protected function validate_required($field, $input, $param = null)
    {
        if (isset($input[$field]) && ($input[$field] === false || $input[$field] === 0 || $input[$field] === 0.0 || $input[$field] === '0' || !empty($input[$field]))) {
            return;
        }

        return array(
            'field' => $field,
            'value' => null,
            'rule' => __FUNCTION__,
            'param' => $param,
        );
    }
protected function validate_required($field, $input, $param = null)
    {
        if (isset($input[$field]) && ($input[$field] === false || $input[$field] === 0 || $input[$field] === 0.0 || $input[$field] === '0' || !empty($input[$field]))) {
            return;
        }

        return array(
            'field' => $field,
            'value' => null,
            'rule' => __FUNCTION__,
            'param' => $param,
        );
    }
protected function validate_required ( $ field , $ input , $ param = null ) { if ( isset ( $ input [ $ field ] ) && ( $ input [ $ field ] === false || $ input [ $ field ] === 0 || $ input [ $ field ] === 0.0 || $ input [ $ field ] === '0' || ! empty ( $ input [ $ field ] ) ) ) { return ; } return array ( 'field' => $ field , 'value' => null , 'rule' => __FUNCTION__ , 'param' => $ param , ) ; }
Check if the specified key is present and not empty.

Usage: '<index>' => 'required'

@param string $field
@param array  $input
@param null   $param

@return mixed
Check if the specified key is present and not empty .