PHP Classes

Yi2 Validator Pack: Implements file and directory validation rules

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 18 All time: 11,310 This week: 488Up
Version License PHP version Categories
yii2-validatorpack 1.0MIT/X Consortium ...5PHP 5, Files and Folders, Libraries, V...
Description 

Author

This package implements file and directory validation rules.

It provides a class that implements several rules to validate the path of files and directories.

Currently, it can validate a path:

- Can only be a directory

- Can only be a file

- Can only be under a given base directory

Picture of Insolita
  Performance   Level  
Name: Insolita <contact>
Classes: 24 packages by
Country: Russian Federation Russian Federation
Age: 38
All time rank: 330890 in Russian Federation Russian Federation
Week rank: 199 Up9 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 17x

Documentation

Yii2 Validators Collection

Status Latest Stable Version Total Downloads License - PathValidator

       public function rules(){
           return [
              [['pathAttribute'],PathValidator::class,'strictDir'=>true],
              [['pathAttribute'],PathValidator::class,'strictFile'=>true,'writeable'=>true],
              [['pathAttribute'],PathValidator::class,'requiredBase'=>'@common/data','readable'=>true],
           ];
       }

Installation

run

composer require --prefer-dist "insolita/yii2-validatorpack:~0.0.2"

or add

"insolita/yii2-validatorpack": "~0.0.2"

  Files folder image Files (15)  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetests (4 files, 2 directories)
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file codeception.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (15)  /  src  
File Role Description
  Plain text file PathValidator.php Class Class source

  Files folder image Files (15)  /  tests  
File Role Description
Files folder imageconfig (2 files)
Files folder imageunit (2 files)
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file bootstrap.php Example Example script
  Accessible without login Plain text file unit.suite.yml Data Auxiliary data
  Accessible without login Plain text file yii Example Example script

  Files folder image Files (15)  /  tests  /  config  
File Role Description
  Plain text file base.php Class Class source
  Accessible without login Plain text file console.php Aux. Auxiliary script

  Files folder image Files (15)  /  tests  /  unit  
File Role Description
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file PathValidatorTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:11,310
This week:488Up