PHP code example of cyberfusion / validation-rules
1. Go to this page and download the library: Download cyberfusion/validation-rules 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/ */
cyberfusion / validation-rules example snippets
use Cyberfusion\ValidationRules\Rules\Cidr;
public function rules(): array
{
return [
'field' => [new Cidr()],
];
}
use Cyberfusion\ValidationRules\Rules\CommonName;
public function rules(): array
{
return [
'field' => [new CommonName()],
];
}
use Cyberfusion\ValidationRules\Rules\CronExpression;
public function rules(): array
{
return [
'field' => [new CronExpression()],
];
}