PHP code example of mozafar / php-validation

1. Go to this page and download the library: Download mozafar/php-validation 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/ */

    

mozafar / php-validation example snippets


use Mozafar\Validation\Validation;

$data = Validation::make($_POST, [
    'name' => ['

use Mozafar\Validation\Validation;
use Mozafar\Validation\ValidationException;

try {
    Validation::make($_POST, [
        'name' => [' $e->errors();
}

sh
composer install mozafar/php-validation