5ichong/validator

The data format validation.

Installs: 4 417

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/5ichong/validator

v1.0.0 2019-06-12 05:40 UTC

This package is not auto-updated.

Last update: 2025-10-30 08:37:52 UTC


README

Build Status

Installation

To install Validator, simply:

$ composer require 5ichong/validator

For latest commit version:

$ composer require 5ichong/validator @dev

Requirements

Validator works with PHP 5.6, 7.0, 7.1.

Quick Start and Examples

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'])