1. Go to this page and download the library: Download moviet/panic-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/ */
moviet / panic-validator example snippets
use Moviet\Validator\Panic;
use Moviet\Validator\Ival;
$panic = new Panic;
$nom = 'Smile';
$getnom = $panic->case($nom)
->rule(':alpha')
->get();
// var_dump : Smile
$data = $panic->verify($_POST['password'], 'DataPassword')
->warn('Do not type password, please use Abcde !!');
if ($panic->catch($data)) {
// $_POST['password']
}
// Print $data => Do not type password, please use Abcde !!
$stringHtml = '<script> If this is XSS </script>';
$filterHtml = $panic->htmlSafe($stringHtml);
$html = $panic->htmlRaw($filterHtml);
// Output : <script> If this is XSS </script>
$string = 'And thanos will go on';
$encode = $panic->base64($string);
// Output : aOAIOAIHJSDH837287ksasjka983jsdhdsfsJHJAdsfd34dfSfb
$decode = $panic->pure64($encode);
// Output : And thanos will go on
html
<form method="POST" action="login.php" name="login">
<table>
<tbody>
<tr><td>
if (!$validUser)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.