PHP code example of pnhs / form_validator

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

    

pnhs / form_validator example snippets


use Pnhs\FormValidator\Validator;

$form = [
    "username" => "nicolahsss",
    "password" => "password26"
];

$validator = new Validator($form);

/*
 * ername', 's NULL
$errors = $validator->errors();

//See the result
var_dump($username, $password, $errors ?? "OK");