2017 © Pedro Peláez
 

yii2-extension yii2-validators

Validators for Yii2

image

yiier/yii2-validators

Validators for Yii2

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 50 % Grown

The README.md

Validators for Yii2

Validators for Yii2, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Installation

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)

Method Listing

中国身份证号码验证, (*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)

The Versions

21/06 2018

dev-master

9999999-dev

Validators for Yii2

  Sources   Download

BSD-4-Clause

The Requires

 

extension yii2 validators

21/06 2018

v0.2

0.2.0.0

Validators for Yii2

  Sources   Download

BSD-4-Clause

The Requires

 

extension yii2 validators

29/05 2018

v0.1

0.1.0.0

Validators for Yii2

  Sources   Download

BSD-4-Clause

The Requires

 

extension yii2 validators