PHPackages                             hlacos/model\_validation - 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. hlacos/model\_validation

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

hlacos/model\_validation
========================

011PHP

Since Jun 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Hlacos/modelValidation)[ Packagist](https://packagist.org/packages/hlacos/model_validation)[ RSS](/packages/hlacos-model-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ModelValidation bundle
======================

[](#modelvalidation-bundle)

Laravel 5 bundle for validate in models.

It's under development, not recommended for production use!

Installation
============

[](#installation)

1. add bundle to composer: "hlacos/modelValidation": "dev-master"
2. composer install / update
3. add service provider to the providers list: 'Hlacos\\ModelValidation\\ModelValidationServiceProvider'

Usage
=====

[](#usage)

In the rules array use the laravel validator formats.

```
class CustomModel extends Eloquent {
    use ModelValidationTrait;

    public $rules = array(
        'attribute' => 'required',
    );
}

$customModel = new CustomModel();
$customModel->setAttributes($attributes);

if ($customModel->isValid()) {
    $customModel->save();
} else {
    return $customModel->errors;
}
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

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/5fc02ed73047a5c4baec884c0a87d6f9f50c3cfa9d1d4c8b2718034d75c7e6a4?d=identicon)[Hlacos](/maintainers/Hlacos)

### Embed Badge

![Health badge](/badges/hlacos-model-validation/health.svg)

```
[![Health](https://phpackages.com/badges/hlacos-model-validation/health.svg)](https://phpackages.com/packages/hlacos-model-validation)
```

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