1. Go to this page and download the library: Download tamedevelopers/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/ */
tamedevelopers / validator example snippets
public function save(Request $request){
$form = new Validator();
or
$form = form();
}
$form->rules([
"string:country:==:0" => 'Please Select a Country',
"email:email" => 'Please enter a valid email address',
])->save(function($response){
$param = $response->param;
$param->country;
$param['country']
---
As you can see, we're able to access data in both ways without errors
})
$form->toObject([
'food' => 'Basmati Rice'
]);
$form->toArray([
'food' => 'Basmati Rice'
]);
$form->toJson([
'food' => 'Basmati Rice'
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.