PHPackages                             fengdangxing/hyperf-validator-quote - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. fengdangxing/hyperf-validator-quote

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

fengdangxing/hyperf-validator-quote
===================================

hyperf-validator封装应用层

v1.1.9(1y ago)020MITPHPPHP &gt;=5.6.0

Since May 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fengdangxing/hyperf-validator-quote)[ Packagist](https://packagist.org/packages/fengdangxing/hyperf-validator-quote)[ RSS](/packages/fengdangxing-hyperf-validator-quote/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (13)Used By (0)

\####简版使用-主要增加自定义方法 放在验证类处理 [validation](https://github.com/hyperf/validation)

---

```
#配置路径 config/annotations.php 没有改文件新建
return [
    'scan' => [
        'paths' => [
            BASE_PATH . '/app',
            BASE_PATH . '/vendor/fengdangxing',//增加该配置
        ],
        'ignore_annotations' => [
            'mixin',
            'Notes',
            'Author',
            'Data',
            'Date'
        ],
    ],
];
```

\#继承基础类

```
namespace App\Validator;

use Fengdangxing\ValidatorQuote\ValidatorQuote;
use Hyperf\Validation\Validator;

class PublishValidator extends ValidatorQuote
{
    protected $scenes = [
        'publish' => ['id', 'mark'],
        'publish_retry' => ['id'],
        'addBatch' => ['merchant_site_id', 'merchant_page_id', 'mark']
    ];

    protected $extendList = ['check_publish'];

    protected $rules = [
        'merchant_site_id' => 'required|check_publish',
        'mark' => 'max:1000',
        'merchant_page_id' => 'check_type_empty',
        'merchant_component_id' => 'check_type',
        'merchant_color_id' => 'check_type',
        'id' => 'required',
    ];

    protected $messages = [
        'merchant_site_id.required' => "1000|merchant_site_id is empty",//code|message
        'id.required' => "1001|id is empty",
        'mark.max' => "1002|mark is empty",
        'merchant_page_id.check_type_empty' => "1003|merchant_page_id is empty",
        'merchant_site_id.check_publish' => "1004|check_publish"
    ];

    protected $filter = [
        'mark' => 'fliter_sql|fliter_str',
    ];

    public function check_publish($attribute, $value, $parameters, Validator $validator)
    {
        return true;
    }
}
```

\#控制器

```
namespace App\Controller;

use Fengdangxing\ValidatorQuote\Annotation\ValidatorQuote;

class IndexController extends AbstractController
{
    /**
     * @VQ(class="\App\Validator\PublishValidator::class",scene="publish")
     */
    public function index()
    {
        $user = $this->request->input('user', 'Hyperf');
        $method = $this->request->getMethod();
        return [
            'method' => $method,
            'message' => "Hello {$user}.",
        ];
    }
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Recently: every ~104 days

Total

12

Last Release

659d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5046433daacc52c8bf881825c043ab22e1ec865b2d32494515260e761fe2bf22?d=identicon)[fengdangxing](/maintainers/fengdangxing)

---

Top Contributors

[![fengdangxing](https://avatars.githubusercontent.com/u/24405972?v=4)](https://github.com/fengdangxing "fengdangxing (13 commits)")

---

Tags

validatorhyperfhyperf-validator

### Embed Badge

![Health badge](/badges/fengdangxing-hyperf-validator-quote/health.svg)

```
[![Health](https://phpackages.com/badges/fengdangxing-hyperf-validator-quote/health.svg)](https://phpackages.com/packages/fengdangxing-hyperf-validator-quote)
```

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M380](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k217.8M206](/packages/seld-jsonlint)[composer/spdx-licenses

SPDX licenses list and validation library.

1.4k184.2M25](/packages/composer-spdx-licenses)[opis/json-schema

Json Schema Validator for PHP

64236.9M185](/packages/opis-json-schema)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15544.9M187](/packages/laminas-laminas-validator)[ergebnis/json-schema-validator

Provides a JSON schema validator, building on top of justinrainbow/json-schema.

3626.9M7](/packages/ergebnis-json-schema-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
