PHPackages                             denarx/laravel-custom-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. denarx/laravel-custom-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

denarx/laravel-custom-validator
===============================

Extends default laravel validator and make rules more strict

017PHP

Since Jan 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DenarX/laravel-custom-validator)[ Packagist](https://packagist.org/packages/denarx/laravel-custom-validator)[ RSS](/packages/denarx-laravel-custom-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

README
======

[](#readme)

Default Illuminate validator has some bugs and features. This package make it more strict and additionally allows you easily to extend it, without creating custom Factory and ServiceProvider, what make possible to change behavior of build-in rules

### Installation

[](#installation)

```
composer require show4me/laravel-custom-validator

```

for Lumen: add to your bootstrap/app.php

```
$app->register(Denarx\LaravelCustomValidator\ValidationServiceProvider::class);
```

### What fixed by default

[](#what-fixed-by-default)

- integer - accept bool true as 1, now throw an error
- not required integer - accept empty string and null, now throw an error
- not required string - don't check min length, just skipped, now throw an error

### Overwrite/extend in your application

[](#overwriteextend-in-your-application)

You can simply extend for adding/changing rules by creating file /app/Validator/Validator.php

```
