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

        if (function_exists('mb_strlen')) {
            if (mb_strlen($input[$field]) <= (int) $param) {
                return;
            }
        } else {
            if (strlen($input[$field]) <= (int) $param) {
                return;
            }
        }

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

        if (function_exists('mb_strlen')) {
            if (mb_strlen($input[$field]) <= (int) $param) {
                return;
            }
        } else {
            if (strlen($input[$field]) <= (int) $param) {
                return;
            }
        }

        return array(
            'field' => $field,
            'value' => $input[$field],
            'rule' => __FUNCTION__,
            'param' => $param,
        );
    }
protected function validate_max_len ( $ field , $ input , $ param = null ) { if ( ! isset ( $ input [ $ field ] ) ) { return ; } if ( function_exists ( 'mb_strlen' ) ) { if ( mb_strlen ( $ input [ $ field ] ) <= ( int ) $ param ) { return ; } } else { if ( strlen ( $ input [ $ field ] ) <= ( int ) $ param ) { return ; } } return array ( 'field' => $ field , 'value' => $ input [ $ field ] , 'rule' => __FUNCTION__ , 'param' => $ param , ) ; }
Determine if the provided value length is less or equal to a specific value.

Usage: '<index>' => 'max_len,240'

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

@return mixed
Determine if the provided value length is less or equal to a specific value .