protected function getWildcardCustomMessages($messages, $search, $default)
    {
        foreach ($messages as $key => $message) {
            if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) {
                return $message;
            }
        }

        return $default;
    }
protected function getWildcardCustomMessages($messages, $search, $default)
    {
        foreach ($messages as $key => $message) {
            if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) {
                return $message;
            }
        }

        return $default;
    }
protected function getWildcardCustomMessages ( $ messages , $ search , $ default ) { foreach ( $ messages as $ key => $ message ) { if ( $ search === $ key || ( Str :: contains ( $ key , [ '*' ] ) && Str :: is ( $ key , $ search ) ) ) { return $ message ; } } return $ default ; }
Check the given messages for a wildcard key.

@param  array  $messages
@param  string  $search
@param  string  $default
@return string
Check the given messages for a wildcard key .