PHPackages                             fish/one-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. fish/one-validator

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

fish/one-validator
==================

Convert server-side to client-side validation

v1.0(11y ago)0311MITPHPPHP &gt;=5.4.0

Since Oct 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/matfish2/one-validator)[ Packagist](https://packagist.org/packages/fish/one-validator)[ RSS](/packages/fish-one-validator/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (9)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/e40335feaa32cdd85b844e2ea2df8f9e3a6735840f2bcac3a83c322ea86a4da1/68747470733a2f2f706f7365722e707567782e6f72672f666973682f6f6e652d76616c696461746f722f762f737461626c652e737667)](https://packagist.org/packages/fish/one-validator) [![Total Downloads](https://camo.githubusercontent.com/42ef311d097be04bb7c1ceb11c22a4402f0ccddae4f5bd8d6b09f2b203d13965/68747470733a2f2f706f7365722e707567782e6f72672f666973682f6f6e652d76616c696461746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/fish/one-validator) [![Latest Unstable Version](https://camo.githubusercontent.com/a3cf3f739151da75fc3fc0c994893018b9de0ba52241416f1d9edb327bd64492/68747470733a2f2f706f7365722e707567782e6f72672f666973682f6f6e652d76616c696461746f722f762f756e737461626c652e737667)](https://packagist.org/packages/fish/one-validator) [![License](https://camo.githubusercontent.com/5679b4b8e72e50d494a650f91a5f95f6305d666cb338c50f74c4f7edced9e3dd/68747470733a2f2f706f7365722e707567782e6f72672f666973682f6f6e652d76616c696461746f722f6c6963656e73652e737667)](https://packagist.org/packages/fish/one-validator)

Server-&gt;Client Validation Converter
======================================

[](#server-client-validation-converter)

While client-side validation is a standard nowadays, setting it is tedious and anti-DRYful. This Laravel 4+ package will convert your server-side rules to the popular [JQuery validate](http://jqueryvalidation.org/) plugin format, while adding all of the necessary assets to support the Laravel set of rules (including remote rules) and messages (including custom attributes and localization). File and date rules are not supported and will be ignored.

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

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `fish/one-validator`.

```
"require-dev": {
	"fish/one-validator": "dev-master"
}

```

Next, update Composer from the Terminal:

```
composer update

```

Once this operation completes, the final step is to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
Fish\OneValidator\OneValidatorServiceProvider

```

Next, publish the assets to your project:

```
php artisan validator:init

```

The file that handles the validation methods and messages will be placed under `public/one-validator.min.js`. Be sure to include the script in your page.

That's it! You're all set to go.

Usage
-----

[](#usage)

The syntax is:

```
php artisan validator:convert path/to/file [--target=validation.js]

```

The first argument is the path to a PHP file with a valid `$rules` array, relative to the `app` folder.

By default the output will be echoed to the console. You can send the output to a file instead by using the `target` option, providing a path relative to the `app` folder.

Remember to replace the default `.my-form` selector with your own form selector.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4330d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelvalidation

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/fish-one-validator/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel

3893.7M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

774680.8k19](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2442.4M9](/packages/laravel-validation-rules-credit-card)[sandermuller/laravel-fluent-validation

Fluent validation rule builders for Laravel

21428.9k6](/packages/sandermuller-laravel-fluent-validation)[romegasoftware/laravel-schema-generator

Generate TypeScript Zod validation schemas from Laravel validation rules

3223.9k](/packages/romegasoftware-laravel-schema-generator)

PHPackages © 2026

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