PHPackages                             lautaro/validator-factory - 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. lautaro/validator-factory

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

lautaro/validator-factory
=========================

Standalone library to use Illuminate\\Validation package outside the Laravel framework.

1.0.1(7y ago)01.6kMITPHP

Since Apr 5Pushed 6y agoCompare

[ Source](https://github.com/LuisNeighbur/validator-factory)[ Packagist](https://packagist.org/packages/lautaro/validator-factory)[ RSS](/packages/lautaro-validator-factory/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

ValidatorFactory
================

[](#validatorfactory)

Standalone library to use the Illuminate\\Validation package outside the Laravel framework.

Installation
------------

[](#installation)

From your terminal, run:

```
$ composer require jeffochoa/validator-factory
```

Usage
-----

[](#usage)

You need to create a new instance of the `ValidatorFactory` class.

```
$factory = new JeffOchoa\ValidatorFactory();

$validator = $factory->make($data = [], $rules);
```

This will return an instance of `Illuminate\Validation\Validator::class`.

You can learn more about the *Laravel Validator* in the [official documentation website](https://laravel.com/docs/5.6/validation).

Customizing error messages
--------------------------

[](#customizing-error-messages)

You can specify a custom translation root directory

```
$validator->translationsRootPath(__DIR__ . '/../../src/')
    ->make($data = [], $rules = ['foo' => 'required'])
```

Inside that directory you will need to create the following structure:

```
- lang/
  - en/
    - validation.php

```

You can customize the structure above by specifying the following values when you create a new instance of the `ValidatorFactory::class`

```
$factory = new ValidatorFactory($namespace = 'lang', $lang = 'en', $group = 'validation');
```

If your plan is to use a custom rule object you would generally call the `trans` helper inside your `messages()` method when working inside of Laravel. However you will not have access to the `trans` helper outside of Laravel so you will need to use `ValidatorFactory::trans($key)` instead.

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~158 days

Total

2

Last Release

2799d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb94678dca145530d63bea1dee24a1f51df766d11a827a5564b3307e822c172d?d=identicon)[LuisNeighbur](/maintainers/LuisNeighbur)

---

Top Contributors

[![jeffochoa](https://avatars.githubusercontent.com/u/8247079?v=4)](https://github.com/jeffochoa "jeffochoa (7 commits)")[![LuisNeighbur](https://avatars.githubusercontent.com/u/803558?v=4)](https://github.com/LuisNeighbur "LuisNeighbur (4 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (2 commits)")[![AlbinoDrought](https://avatars.githubusercontent.com/u/852873?v=4)](https://github.com/AlbinoDrought "AlbinoDrought (1 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")

### Embed Badge

![Health badge](/badges/lautaro-validator-factory/health.svg)

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

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[illuminate/validation

The Illuminate Validation package.

18936.7M1.4k](/packages/illuminate-validation)

PHPackages © 2026

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