PHP code example of evolutionphp / form_validation

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

    

evolutionphp / form_validation example snippets


$form_validation = new \EvolutionPHP\FormValidation\FormValidation();
$form_validation->set_rules('username','Username','


if($_SERVER['REQUEST_METHOD'] == 'POST'){
    $form_validation = new \EvolutionPHP\FormValidation\FormValidation();
    $form_validation->set_rules('username','Username','

$rules = [
    [
        'field' => 'username',
        'label' => 'Username',
        'rules' => 'uired|min_length[6]',
        'errors' => [
            '

$data = [
    'username' => 'smith',
    'password' => 'IAmGroot'
]
$form_validation->set_data($data); 

$lang['form_validation__is_image'] = 'The {field} field does not contains a valid image.';
$form_validation->set_language($data);