PHP code example of viloveul / validation

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

    

viloveul / validation example snippets




class UserValidation extends Viloveul\Validation\Validator
{
    public function rules(): array {
        return [
            'insert' => [
                'username' => [
                    '                    'ls', 'passconf'],
                ],
                'passconf' => [
                    '$validation->validate('login') === false) {
    var_dump($validation->errors());
}