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)2MITPHP

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 1mo ago

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

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 84% 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

2797d 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/ui

Laravel UI utilities and presets.

2.7k134.9M596](/packages/laravel-ui)[laravel/breeze

Minimal Laravel authentication scaffolding with Blade and Tailwind.

3.0k31.3M145](/packages/laravel-breeze)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

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

PHPackages © 2026

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