src/Leevel/Validate/Validator.php
public function success(): bool
    {
        $skipRule = $this->getSkipRule();

        $this->failedRules = $this->errorMessages = [];

        foreach ($this->rules as $field => $rules) {
            foreach ($rules as $rule) {
                if (in_array($rule, $skipRule, true)) {
                    continue;
                }

                if (false === $this->doValidateItem($field, $rule)) {
                    // 验证失败跳过剩余验证规则
                    if ($this->shouldSkipOther($field)) {
                        break 2;
                    }

                    // 验证失败跳过自身剩余验证规则
                    if ($this->shouldSkipSelf($field)) {
                        break;
                    }
                }
            }
        }

        unset($skipRule);

        foreach ($this->afters as $after) {
            $after();
        }

        return 0 === count($this->errorMessages);
    }
public function success(): bool
    {
        $skipRule = $this->getSkipRule();

        $this->failedRules = $this->errorMessages = [];

        foreach ($this->rules as $field => $rules) {
            foreach ($rules as $rule) {
                if (in_array($rule, $skipRule, true)) {
                    continue;
                }

                if (false === $this->doValidateItem($field, $rule)) {
                    // 验证失败跳过剩余验证规则
                    if ($this->shouldSkipOther($field)) {
                        break 2;
                    }

                    // 验证失败跳过自身剩余验证规则
                    if ($this->shouldSkipSelf($field)) {
                        break;
                    }
                }
            }
        }

        unset($skipRule);

        foreach ($this->afters as $after) {
            $after();
        }

        return 0 === count($this->errorMessages);
    }
验证是否成功

@return bool