petrabarus/yii2-eithervalidator

Yii2 validator to force one of certain attributes to be filled

Installs: 15 419

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 2

Open Issues: 1

pkg:composer/petrabarus/yii2-eithervalidator

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

This package is auto-updated.

Last update: 2025-10-22 17:31:44 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']]