PHPackages                             yadjet/yii2-validators - 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. yadjet/yii2-validators

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

yadjet/yii2-validators
======================

Yii2 Validators

1.0.1(6y ago)0133BSD-3-ClausePHPPHP &gt;=5.4CI failing

Since Aug 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hiscaler/yii2-validators)[ Packagist](https://packagist.org/packages/yadjet/yii2-validators)[ RSS](/packages/yadjet-yii2-validators/feed)WikiDiscussions master Synced 1mo ago

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

关于
==

[](#关于)

基于 Yii2 的验证器

安装方法
----

[](#安装方法)

```
composer require "yadjet/yii2-validators:dev-master"
```

使用方法
----

[](#使用方法)

```
public function rules()
{
    return [
        ......
        ['username', '\yadjet\validators\ChineseValidator'],
        ['username', '\yadjet\validators\EnglishValidator'],
        ['id_card_number', '\yadjet\validators\IdCardNumberValidator'],
        ['ip', '\yadjet\validators\IpValidator'],
        ['mobile_phone', '\yadjet\validators\MobilePhoneNumberValidator'],
        ['tel', '\yadjet\validators\PhoneNumberValidator'],
        ['qq', '\yadjet\validators\QqValidator'],
        ['zip_code', '\yadjet\validators\ZipcodeValidator'],
    ];
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~1484 days

Total

2

Last Release

2457d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3f0543fc8f1bcc1a23dfc2706793b7c1e4f9cac8fab6362466b62b5774a9c9c?d=identicon)[hiscaler](/maintainers/hiscaler)

---

Top Contributors

[![hiscaler](https://avatars.githubusercontent.com/u/1013287?v=4)](https://github.com/hiscaler "hiscaler (26 commits)")

---

Tags

yii2validators

### Embed Badge

![Health badge](/badges/yadjet-yii2-validators/health.svg)

```
[![Health](https://phpackages.com/badges/yadjet-yii2-validators/health.svg)](https://phpackages.com/packages/yadjet-yii2-validators)
```

###  Alternatives

[borales/yii2-phone-input

Yii2 International telephone numbers - Asset Bundle, Behavior, Validator, Widget

1341.6M6](/packages/borales-yii2-phone-input)[codeonyii/yii2-at-least-validator

Validates at least one (or more) attributes.

28253.5k1](/packages/codeonyii-yii2-at-least-validator)[arogachev/yii2-many-to-many

Many-to-many ActiveRecord relation for Yii 2 framework

3541.2k4](/packages/arogachev-yii2-many-to-many)[bryglen/yii2-validators

credit card validation yii 2

1426.7k](/packages/bryglen-yii2-validators)

PHPackages © 2026

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