public function match($input, $key, $match, $lang)
    {
        $lang = $this->custom('match', $lang);
        if ($input[$key] !== $input[$match]) {
            return preg_replace_callback('/(\:field)(.*)(\:match)/i',
            function ($m) use ($key, $match) {
                return $key.$m[2].$match;
            }, $lang);
        }
    }
public function match($input, $key, $match, $lang)
    {
        $lang = $this->custom('match', $lang);
        if ($input[$key] !== $input[$match]) {
            return preg_replace_callback('/(\:field)(.*)(\:match)/i',
            function ($m) use ($key, $match) {
                return $key.$m[2].$match;
            }, $lang);
        }
    }
public function match ( $ input , $ key , $ match , $ lang ) { $ lang = $ this -> custom ( 'match' , $ lang ) ; if ( $ input [ $ key ] !== $ input [ $ match ] ) { return preg_replace_callback ( '/(\:field)(.*)(\:match)/i' , function ( $ m ) use ( $ key , $ match ) { return $ key . $ m [ 2 ] . $ match ; } , $ lang ) ; } }
Parses a match validation field.

@param array  $input - Input to be validated
@param string $key   - Validation key
@param string $match - The option looking to be matched up with $key
@param string $lang  - Language string

@return string
Parses a match validation field .