PHPackages                             nobelatunje/laravel-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. nobelatunje/laravel-validator

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

nobelatunje/laravel-validator
=============================

A simple and easier validation functionality built on top of Laravel Validator class.

10PHP

Since May 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Atunje/LaravelValidator)[ Packagist](https://packagist.org/packages/nobelatunje/laravel-validator)[ RSS](/packages/nobelatunje-laravel-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Nobelatunje/LaravelValidator
============================

[](#nobelatunjelaravelvalidator)

A simple and easier validation functionality built on top of Laravel Validator class.

This library is majorly for Lumen but can also plugged into a Laravel application and easily manage validation.

Core functionalities are:

1. Validates incoming request data and returns an array of validated parameters
2. It can also return a model object if you like, just set the model parameters
3. You can also extract validated fields even if the validation fails
4. It can be injected into your controller class and usage is smooth

### How to install

[](#how-to-install)

Install via composer

```
$ composer install nobelatunje/laravel-validator

```

### How to use in your controller

[](#how-to-use-in-your-controller)

```
namespace App\Http\Controllers;

use Nobelatunje\LaravelValidator;

class CustomerController extends Controller {

    public function create(LaravelValidator $validator, Request $request) {

        //set validation rules
        $this->setValidationRules($validator);

        if($validator->validate($request)) {

            //save the customer
            $validator->customer->save();

            //do other things

        } else {
            //return the error message or do something else
            return $validator->error_message;
        }

    }

    private function setValidationRules(LaravelValidator $validator) {
        //set the model params
        $validator->setModelParams(Customer::class, 'customer')
        //set the fields and the validation rules
        ->field('firstname', 'string|required', 'FirstName')
        ->field('lastname', 'string|required', 'LastName')
        ->field('email', 'required|email:rfc,dns|unique:customers', 'Email Address')
        ->field('phone_number', 'required|string|unique:customers', 'Phone Number');
    }

}
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/82bf25b377d2e62c977b45b7665300ef8117afe9ed26fe24bd2449bd15ffb2a0?d=identicon)[nobelatunje](/maintainers/nobelatunje)

---

Top Contributors

[![Atunje](https://avatars.githubusercontent.com/u/12198695?v=4)](https://github.com/Atunje "Atunje (4 commits)")

### Embed Badge

![Health badge](/badges/nobelatunje-laravel-validator/health.svg)

```
[![Health](https://phpackages.com/badges/nobelatunje-laravel-validator/health.svg)](https://phpackages.com/packages/nobelatunje-laravel-validator)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
