askedio/laravel-validator-filter
Larablocks Analysis
askedio/laravel-validator-filter works with Laravel 5 (latest release 5.2, Apr 20, 2018), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Apr 20, 2018)
- 0 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Apr 20, 2018.
- No releases in the last 12 months.
- First released: Aug 1, 2016.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require askedio/laravel-validator-filter |
|
| Latest Version: | 5.2 |
| PHP: | >=5.5.9 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Apr 27, 2018 |
| Links: | GitHub · Packagist |
Laravel Validator Filter
Filter items before your validate them with Laravel 5s Validator.
Values will be filtered based on the function you provide. If the parameter exists in the request it will also be replaced.
Installation
composer require askedio/laravel-validator-filter
Add the following to the providers array in config/app.php:
Askedio\LaravelValidatorFilter\FilterServiceProvider::class
Examples
You can use any function that is callable and accepts the value as the parameter.
$validator = app('validator')->make([
'string' => 'Hello ' . PHP_EOL . ' World',
], [
'string' => 'filter:strip_tags,nl2br',
]);
$validator->passes();
dd($validator->getData());
You can use a function with parameters in line. () = [] & , = ;.
$validator = app('validator')->make([
'string' => 'Hello <br> World<p></p>',
], [
'string' => 'filter:strip_tags[{$value}; "<br>"]',
]);
$validator->passes();
dd($validator->getData());
You can also define your own custom filter.
app('filter')->register('plusOne', function ($value) {
return $value+1;
});
$validator = app('validator')->make([
'int' => '<br>1',
], [
'int' => 'filter:strip_tags,plusOne',
]);
$validator->passes();
dd($validator->getData());
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 5.2 | >=5.5.9 | 5.2.* | MIT | |
| 1.1.1 | >=5.5.9 | 5.2.* | MIT | |
| 1.1.0 | >=5.5.9 | 5.2.* | MIT | |
| 1.0.0 | >=5.5.9 | 5.2.* | MIT |