phossa2 / validate
A PHP validation proxy to various validate libraries.
2.0.0
2016-09-26 05:25 UTC
Requires
- php: ~5.4|~7.0
- phossa2/shared: dev-master
- wixel/gump: dev-master
Requires (Dev)
- phpunit/phpunit: 4.*
- squizlabs/php_codesniffer: 2.*
Replaces
- phossa/phossa-validate: *
This package is not auto-updated.
Last update: 2024-11-09 21:01:35 UTC
README
phossa2/validate is a PHP validation proxy to various validate libraries.
It requires PHP 5.4, supports PHP 7.0+ and HHVM. It is compliant with PSR-1, PSR-2, PSR-3, PSR-4, and the proposed PSR-5.
Installation
Install via the composer
utility.
composer require "phossa2/validate"
or add the following lines to your composer.json
{ "require": { "phossa2/validate": "^2.0.0" } }
Usage
Create the validate instance,
use Phossa2\Validate\Validate; $v = new Validate(); if (true === $v->validate($_POST, [ 'username' => 'required|alpha_numeric', 'password' => 'required|max_len,100|min_len,6' ])) { // continue } else { $err = $v->getError(); }
Change log
Please see CHANGELOG from more information.
Testing
$ composer test
Contributing
Please see CONTRIBUTE for more information.
Dependencies
-
PHP >= 5.4.0
-
phossa2/shared >= 2.0.21
-
wixel/gump >= 1.4