PHPackages                             panwenbin/yii2-eithervalidator - 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. panwenbin/yii2-eithervalidator

ActiveLibrary

panwenbin/yii2-eithervalidator
==============================

Yii2 validator for either attributes is required

0.0.1(9y ago)0158MITPHPPHP &gt;=5.4.0

Since Jan 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/panwenbin/yii2-eithervalidator)[ Packagist](https://packagist.org/packages/panwenbin/yii2-eithervalidator)[ RSS](/packages/panwenbin-yii2-eithervalidator/feed)WikiDiscussions master Synced 2mo ago

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

yii2-either-validator
=====================

[](#yii2-either-validator)

Yii2 validator for either attributes is required

Installation
------------

[](#installation)

```
composer require "panwenbin/yii2-eithervalidator"

```

Usage
-----

[](#usage)

Add a rule similar to the following to rules of the model

```
    [
        ['email'],
        EitherValidator::className(),
        'eitherAttributes' => ['phone'],
        'message' => Yii::t('app', 'Either attribute {attribute}, {either_attributes} is required')
    ]
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

3417d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9246abb5bc6b21062bebdd5685fb7eda856f3208707e743b848d97a62d81935e?d=identicon)[panwenbin](/maintainers/panwenbin)

---

Top Contributors

[![petrabarus](https://avatars.githubusercontent.com/u/523289?v=4)](https://github.com/petrabarus "petrabarus (3 commits)")[![panwenbin](https://avatars.githubusercontent.com/u/19491104?v=4)](https://github.com/panwenbin "panwenbin (1 commits)")

### Embed Badge

![Health badge](/badges/panwenbin-yii2-eithervalidator/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)

PHPackages © 2026

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