New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

askedio/laravel-validator-filter

Filter items before validating them with Laravels Validator
18 3

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 advised

Not 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
Maintainer: gcphost

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.

Build Status Codacy Badge Codacy Badge StyleCI

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

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

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