public function max($input, $key, $max, $lang)
    {
        $lang = $this->custom('max', $lang);
        if (strlen($input[$key]) > $max) {
            return preg_replace_callback('/(:field)(.*)(\:num)/i',
            function ($m) use ($key, $max) {
                return $key.$m[2].$max;
            }, $lang);
        }
    }
public function max($input, $key, $max, $lang)
    {
        $lang = $this->custom('max', $lang);
        if (strlen($input[$key]) > $max) {
            return preg_replace_callback('/(:field)(.*)(\:num)/i',
            function ($m) use ($key, $max) {
                return $key.$m[2].$max;
            }, $lang);
        }
    }
public function max ( $ input , $ key , $ max , $ lang ) { $ lang = $ this -> custom ( 'max' , $ lang ) ; if ( strlen ( $ input [ $ key ] ) > $ max ) { return preg_replace_callback ( '/(:field)(.*)(\:num)/i' , function ( $ m ) use ( $ key , $ max ) { return $ key . $ m [ 2 ] . $ max ; } , $ lang ) ; } }
Parses a set maximum number of characters.

@param $input - Language string
@param string $key  - Validation Key
@param int    $max  - The set maximum
@param string $lang - Language string

@return mixed
Parses a set maximum number of characters .