PHPackages                             ahmetsabri/gaza-validation-generator - 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. ahmetsabri/gaza-validation-generator

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

ahmetsabri/gaza-validation-generator
====================================

A Laravel package to generate validation rules for database tables

1(1y ago)171.3k4MITPHP

Since Dec 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ahmetsabri/gaza-validation-generator)[ Packagist](https://packagist.org/packages/ahmetsabri/gaza-validation-generator)[ RSS](/packages/ahmetsabri-gaza-validation-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

**🇵🇸Free Palestine🇵🇸**
======================

[](#free-palestine)

Gaza Validation Generator
=========================

[](#gaza-validation-generator)

**Gaza Validation Generator** is a Laravel package designed to simplify the creation of validation rules for database tables. This package dynamically generates a validation array based on the schema of a specified table, helping you reduce manual effort and improve consistency.

---

Features
--------

[](#features)

- Generate validation rules for any database table with a single command.
- Automatically detects column properties such as `nullable`, `type`, and `length` to create appropriate rules.
- Supports common validation rules like `required`, `nullable`, `string`, `integer`, `numeric`, `boolean`, `date`, and more.
- Provides a clean, readable output in PHP array format.

---

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

[](#installation)

To install the package, run:

```
composer require ahmetsabri/gaza-validation-generator
```

---

Usage
-----

[](#usage)

Once installed, you can use the provided artisan command to generate validation rules for any table in your database.

### Command

[](#command)

```
php artisan validate-table {tableName}
```

Replace `{tableName}` with the name of the table you want to validate.

### Example

[](#example)

For a table named `users` with the following schema:

ColumnTypeNullableLengthExtraidBIGINTNO-Auto IncrementnameVARCHARNO255emailVARCHARYES255phoneVARCHARNO255noteTEXTYES-created\_atTIMESTAMPYES-updated\_atTIMESTAMPYES-Running the command:

```
php artisan validate-table users
```

Will output:

```
[
    'name' => ['required', 'string', 'max:255'],
    'email' => ['nullable', 'string', 'max:255'],
    'phone' => ['required', 'string', 'max:255'],
    'note' => ['nullable', 'string'],
]
```

---

Contributing
------------

[](#contributing)

Contributions are welcome! Feel free to fork the repository and submit pull requests for improvements.

---

License
-------

[](#license)

This package is open-source and licensed under the [MIT License](https://opensource.org/licenses/MIT).

---

Support
-------

[](#support)

For issues or questions, please open an issue on the [GitHub repository](https://github.com/ahmetsabri/gaza-validation-generator) or contact the maintainer at ****.

---

Credits
-------

[](#credits)

Developed with ❤️

---

Let me know if you’d like to refine this further!

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance44

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

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

513d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fc594d9f88b6e43b1930e3e0faee528cb9b8aea52df32ecb4ac246e4742b8a0?d=identicon)[ahmetsabri](/maintainers/ahmetsabri)

---

Top Contributors

[![ahmetsabri](https://avatars.githubusercontent.com/u/39857006?v=4)](https://github.com/ahmetsabri "ahmetsabri (18 commits)")[![devNoiseConsulting](https://avatars.githubusercontent.com/u/1700471?v=4)](https://github.com/devNoiseConsulting "devNoiseConsulting (7 commits)")[![mnurullahsaglam](https://avatars.githubusercontent.com/u/32842660?v=4)](https://github.com/mnurullahsaglam "mnurullahsaglam (1 commits)")

### Embed Badge

![Health badge](/badges/ahmetsabri-gaza-validation-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ahmetsabri-gaza-validation-generator/health.svg)](https://phpackages.com/packages/ahmetsabri-gaza-validation-generator)
```

###  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)
