PHP code example of preflow / validation
1. Go to this page and download the library: Download preflow/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/ */
preflow / validation example snippets
use Preflow\Validation\Rules\{Numeric, Step, WhenFilled};
$rules = ['price' => [new WhenFilled(new Numeric(), new Step(0.5))]]; // empty is fine
$rules = ['price' => ['
$result = $container->get(ValidatorFactory::class)->make(['to' => ['