PHP code example of rizwan3d / validation-my-php

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

    

rizwan3d / validation-my-php example snippets


use ValidationMyPhp\Validation;

Validation::$DB_HOST = '127.0.0.1';
Validation::$DB_NAME = 'database';
Validation::$DB_PASSWORD = '';
Validation::$DB_USER = 'root';

$validation = new Validation();

$data = [
    'firstname' => '',
    'username' => '33158413',
    'address' => 'This is my address',
    'zipcode' => '1',
    'email' => 'jo@',
    'password' => 'test123',
    'password2' => 'test',
];

$fields = [
    'firstname' => 'e: users,username',
    'password' => '