PHP Classes

Yi2 Validator Pack: Implements file and directory validation rules

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 18 All time: 11,235 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: 23 packages by
Country: Russian Federation Russian Federation
Age: 38
All time rank: 332791 in Russian Federation Russian Federation
Week rank: 73 Up7 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 16x

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  
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  /  src  
File Role Description
  Plain text file PathValidator.php Class Class source

  Files folder image Files  /  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  /  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  /  tests  /  unit  
File Role Description
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file PathValidatorTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:11,235
This week:488Up