dev-master
9999999-devThe data format validation.
Apache-2.0
The Requires
- php >=5.5.0
The Development Requires
by Weijian Zhang
validator check validate
The data format validation.
To install Validator, simply:, (*2)
$ composer require 5ichong/validator
For latest commit version:, (*3)
$ composer require 5ichong/validator @dev
Validator works with PHP 5.6, 7.0, 7.1., (*4)
require __DIR__ . '/vendor/autoload.php'; use \Aichong\Validator; $curl = new Validator(); $validator->validate(['test' => ''], ['test' => 'required'], ['test' => 'empty']); $validator->validate(['test' => '1'], ['test' => 'equals:1'], ['test' => 'noequals']); $validator->validate(['test' => '123'], ['test' => 'length:3'], ['test' => 'nolength']); $validator->validate(['test' => '15821789646'], ['test' => 'phone'], ['test' => 'nophone'])
The data format validation.
Apache-2.0
validator check validate