PHP code example of ohtyap / laravel-sane-validator
1. Go to this page and download the library: Download ohtyap/laravel-sane-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/ */
ohtyap / laravel-sane-validator example snippets
public function boot(): void
{
$this->app->extend('validator', function (Factory $factory) {
$factory->resolver(function (Translator $translator, array $data, array $rules, array $messages, array $attributes) {
return new \Ohtyap\LaravelSaneValidator\Validator($translator, $data, $rules, $messages, $attributes);
});
return $factory;
});
}