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: 3
Forks: 2
Open Issues: 1
Requires
- php: >=5.5.0
- yiisoft/yii2: *
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']]