PHP code example of openlss / lib-validate
1. Go to this page and download the library: Download openlss/lib-validate 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/ */
openlss / lib-validate example snippets
use \LSS\Validate;
$data = array('myparam'=>'valid string');
try {
Validate::prime($data);
Validate::go('myparam')->not('blank')->max(20)->is('alnum');
Validate::paint();
} catch(Exception $e){
echo $e;
}