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    
Last Updated Ratings Unique User Downloads Download Rankings
2022-10-29 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 14 Not yet ranked
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: 19 packages by
Country: Russian Federation Russian Federation
Age: 37
All time rank: 342694 in Russian Federation Russian Federation
Week rank: 57 Up6 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 13x

Details

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  
 100%
Total:14
This week:0