PHP code example of deskola / simple-validator

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

    

deskola / simple-validator example snippets



$validation = new Deskola\SimpleValidator\InputFilter();

$data = [
    'name' => 'Doe',
    'email' => '[email protected]',
    'phone' => '2547********'
];

$iso = "KE";
$fields = [
    'name' => "string| 

Array
(
)

Array
(
    [name] => The name must have at most 3 characters
    [email] => The email is not a valid email address
    [phone] => The phone must be a valid phone number
)