src/Leevel/Validate/Validator.php
public function getParseRule(string $field, $rules): array
    {
        $rules = (array) $rules;

        foreach ($this->rules[$field] as $rule) {
            list($rule, $parameter) = $this->parseRule($rule);

            if (in_array($rule, $rules, true)) {
                return [$rule, $parameter];
            }
        }

        return [];
    }
public function getParseRule(string $field, $rules): array
    {
        $rules = (array) $rules;

        foreach ($this->rules[$field] as $rule) {
            list($rule, $parameter) = $this->parseRule($rule);

            if (in_array($rule, $rules, true)) {
                return [$rule, $parameter];
            }
        }

        return [];
    }
尝试读取格式化条件.

@param string       $field
@param array|string $rules

@return array