PHP code example of atelierspierrot / validators
1. Go to this page and download the library: Download atelierspierrot/validators 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/ */
atelierspierrot / validators example snippets
$thing = '[email protected]';
$v = new \Validator\EmailValidator();
if ($v->validate($thing)) {
// $thing is OK ...
} else {
// $thing is KO ...
$new_thing = $v->sanitize($thing);
// $new_thing must be OK ...
}