petrabarus/yii2-eithervalidator

Yii2 validator to force one of certain attributes to be filled

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

This package is auto-updated.

Last update: 2024-10-22 15:34:50 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']]