edofre / yii2-validators
Yii2 frequently used validators
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Type:yii2-extension
Requires
- php: >=5.5.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-21 20:41:29 UTC
README
Installation
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require edofre/yii2-validators "V1.0.2"
or add
"edofre/yii2-validators": "V1.0.2"
to the require
section of your composer.json
file.
ZipCodeValidator
Insert into rules as following
/** * @inheritdoc */ public function rules() { return [ ... ['zip_code', 'edofre\validators\ZipCodeValidator'], ... ]; }
PriceValidator
Insert into rules as following
/** * @inheritdoc */ public function rules() { return [ ... ['price', 'edofre\validators\PriceValidator'], ... ]; }