dev-master
9999999-devValidators for Yii2
BSD-4-Clause
The Requires
by forecho
extension yii2 validators
Validators for Yii2
Validators for Yii2, (*1)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist yiier/yii2-validators "*"
or add, (*5)
"yiier/yii2-validators": "*"
to the require section of your composer.json
file., (*6)
中国身份证号码验证, (*7)
public function rules() { return [ // ... ['id_card', \yiier\validators\IdCardValidator::class], // code ]; }
Array Validator, (*8)
public function rules() { return [ // ... ['product_ids', \yiier\validators\ArrayValidator::class], // code ]; }
Phone Validator, (*9)
public function rules() { return [ // ... ['phone', \yiier\validators\PhoneValidator::class], // code ]; }
Money Validator, (*10)
public function rules() { return [ // ... ['amount', \yiier\validators\MoneyValidator::class], ['amount', \yiier\validators\MoneyValidator::class, 'allowsNegative' => true], // code ]; }
……, (*11)
Validators for Yii2
BSD-4-Clause
extension yii2 validators