petrabarus/yii2-eithervalidator

Yii2 validator to force one of certain attributes to be filled

Maintainers

Package info

github.com/petrabarus/yii2-eithervalidator

pkg:composer/petrabarus/yii2-eithervalidator

Statistics

Installs: 15 420

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 1

dev-master 2015-02-12 04:56 UTC

This package is auto-updated.

Last update: 2026-02-22 18:23:17 UTC


README

Yii2 validator to force one of attributes to be filled.

Installation

Add the following line to the composer.

"petrabarus/yii2-eithervalidator": "*"

Usage

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

[['email'], PetraBarus\Yii2\Validators\EitherValidator::class, 
	'otherAttributes' => ['phone']]