src/Leevel/Validate/Validator.php
protected function parseDataKeyRecursion(array $datas, string $parentKey = ''): array
    {
        $dataKeys = [];

        foreach ($datas as $key => $datas) {
            $first = ($parentKey ? $parentKey.'.' : '').$key;

            if (is_array($datas)) {
                $dataKeys = array_merge($dataKeys, $this->parseDataKeyRecursion($datas, $first));
            } else {
                $dataKeys[] = $first;
            }
        }

        return $dataKeys;
    }
protected function parseDataKeyRecursion(array $datas, string $parentKey = ''): array
    {
        $dataKeys = [];

        foreach ($datas as $key => $datas) {
            $first = ($parentKey ? $parentKey.'.' : '').$key;

            if (is_array($datas)) {
                $dataKeys = array_merge($dataKeys, $this->parseDataKeyRecursion($datas, $first));
            } else {
                $dataKeys[] = $first;
            }
        }

        return $dataKeys;
    }
递归分析.

@param array  $datas
@param string $parentKey

@return array