PHP code example of cledilsonweb / lontra-validator
1. Go to this page and download the library: Download cledilsonweb/lontra-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/ */
$inputFilter->add(
[
'name' => 'input_name',
'[
[
'name' => DateGreaterThan::class, 'options' => [
'format' => 'Y-m-d',
'min' => 'now',
'messages' => [
DateGreaterThan::NOT_GREATER_INCLUSIVE => 'A data informada deve ser maior ou igual a data atual', DateGreaterThan::NOT_GREATER => "A data informada deve ser maior que a data atual", DateGreaterThan::IVALID_FORMAT => "A data informada está no formato inválido", DateGreaterThan::IVALID_DATE => "A data informada é inválida",
]
]
]
]
]
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.