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

ActiveLibrary

jeffochoa/validator-factory
===========================

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

1.0.1(7y ago)4412.1k↓100%15[3 issues](https://github.com/jeffochoa/validator-factory/issues)[1 PRs](https://github.com/jeffochoa/validator-factory/pulls)MITPHP

Since Apr 5Pushed 4y ago3 watchersCompare

[ Source](https://github.com/jeffochoa/validator-factory)[ Packagist](https://packagist.org/packages/jeffochoa/validator-factory)[ RSS](/packages/jeffochoa-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

38

↑

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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.

###  Release Activity

Cadence

Every ~158 days

Total

2

Last Release

2751d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80d5b818ba7e153fc45449cac9bf17346ac5c668a32596b454f3d5380281207e?d=identicon)[jeffer8a](/maintainers/jeffer8a)

---

Top Contributors

[![jeffochoa](https://avatars.githubusercontent.com/u/8247079?v=4)](https://github.com/jeffochoa "jeffochoa (7 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/jeffochoa-validator-factory/health.svg)

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

###  Alternatives

[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k25.9M651](/packages/laravel-lumen-framework)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

20887.0k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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