PHPackages                             triun/laravel-model-validable - 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. triun/laravel-model-validable

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

triun/laravel-model-validable
=============================

Gives the models the ability to be validated before saved.

1473PHP

Since Jan 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Triun/laravel-model-validable)[ Packagist](https://packagist.org/packages/triun/laravel-model-validable)[ RSS](/packages/triun-laravel-model-validable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Model Validable
=======================

[](#laravel-model-validable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1c519e5d7ec74dfaf88437b2efaf35738c56594cd6d1f27835838e938c10706e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747269756e2f6c61726176656c2d6d6f64656c2d76616c696461626c652e737667)](https://packagist.org/packages/triun/laravel-model-validable)[![Pre Release Version on Packagist](https://camo.githubusercontent.com/bcc049b0f428227d2efb8ac032dfff12ed6b3990e84ed399d7047631db13dc8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f747269756e2f6c61726176656c2d6d6f64656c2d76616c696461626c652e737667)](https://packagist.org/packages/triun/laravel-model-validable)[![Latest Unstable Version](https://camo.githubusercontent.com/f89e07ee9833f2cb2523154f409b8426ca06d5c3620be63541ce142dbc84e390/68747470733a2f2f706f7365722e707567782e6f72672f747269756e2f6c61726176656c2d6d6f64656c2d76616c696461626c652f762f756e737461626c65)](https://packagist.org/packages/triun/laravel-model-validable)[![Build Status](https://camo.githubusercontent.com/756c48653f86f15a2e35997f9ba8ea658618ed7c6de53a27f655431ae5ff1dbc/68747470733a2f2f7472617669732d63692e6f72672f547269756e2f6c61726176656c2d6d6f64656c2d76616c696461626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Triun/laravel-model-validable)[![Total Downloads](https://camo.githubusercontent.com/246f6d2474ca852f09b1021fc1d03d8df27162b29c3272243e8033df436575b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747269756e2f6c61726176656c2d6d6f64656c2d76616c696461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/triun/laravel-model-validable)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Gives the models the ability to be validated before saved.

About
-----

[](#about)

Gives the models the ability to auto-validate them selves.

This module is not for business logic, but to protect the data in the database.

In use with the triun\\laravel-model-base generator, the skeleton modifier of this package will generate the rules automatically, based on the table scheme.

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

[](#installation)

Require this package with composer using the following command:

```
composer require triun/laravel-model-validable:dev-master
```

### Development only installation

[](#development-only-installation)

DO NOT install in development mode in composer if you are using the contract interface or the trait

To install this package on only development systems, add the `--dev` flag to your composer command:

```
composer require --dev triun/laravel-model-validable:dev-master
```

Skeleton Modifiers
------------------

[](#skeleton-modifiers)

If you want to add the skeleton modifiers to the model base generator, you can do so adding the modifiers in the `config/model-base.php` file:

```
    'modifiers' => [
        \Triun\ModelValidable\Modifiers\ModelValidableModifier::class,
        \Triun\ModelValidable\Modifiers\RulesModifier::class,
    ],
```

Usage
-----

[](#usage)

TODO

Issues
------

[](#issues)

Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/Triun/laravel-model-validable/issues).

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for information.

License
-------

[](#license)

The Laravel Model Base is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/triun-laravel-model-validable/health.svg)

```
[![Health](https://phpackages.com/badges/triun-laravel-model-validable/health.svg)](https://phpackages.com/packages/triun-laravel-model-validable)
```

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