PHP code example of vakata / validation

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

    

vakata / validation example snippets

 php
$v = new \vakata\validation\Validator();
$v
    ->lphaF")
    ->hildren.*.name")->alpha(null, "alphaC")
    ->optional("children.*.age")->numeric(null, "numericC");
$errors = $v->run($_POST);
// inspect the array - if empty - the data is valid