PHP code example of 5ichong / validator

1. Go to this page and download the library: Download 5ichong/validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

5ichong / validator example snippets




use \Aichong\Validator;

$curl = new Validator();
$validator->validate(['test' => ''], ['test' => 'alidate(['test' => '123'], ['test' => 'length:3'], ['test' => 'nolength']);
$validator->validate(['test' => '15821789646'], ['test' => 'phone'], ['test' => 'nophone'])