PHPackages                             moves/eloquent-validatable - 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. moves/eloquent-validatable

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

moves/eloquent-validatable
==========================

3.0.0(3y ago)05.3kMITPHPPHP ^8.1

Since Aug 26Pushed 2y ago5 watchersCompare

[ Source](https://github.com/vetmoves/com.moves.php.eloquent.validatable)[ Packagist](https://packagist.org/packages/moves/eloquent-validatable)[ RSS](/packages/moves-eloquent-validatable/feed)WikiDiscussions 1.x Synced today

READMEChangelogDependencies (7)Versions (11)Used By (0)

Eloquent Validatable
====================

[](#eloquent-validatable)

Introduction
------------

[](#introduction)

Eloquent Validatable is a set of functions for Eloquent models that wrap [Laravel's Validator](https://github.com/illuminate/validation). Validate your Model classes automatically on save, removing the need for unnecessary boilerplate in your controllers and the rest of your application code.

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

[](#installation)

To add this library into your project, run:

```
composer require moves/eloquent-validatable

```

Usage
-----

[](#usage)

### Basic Configuration

[](#basic-configuration)

Create your Eloquent Model with the Validatable interface and trait, then add your configuration settings.

```
use Moves\Eloquent\Validatable\Interfaces\IValidatable;
use Moves\Eloquent\Validatable\Validatable;

class YourModel implements IValidatable {
    use Validatable;

    protected $validateOnSave = true;
    protected $validationRules = [...];
    protected $validationMessages = [...];
    protected $validationCustomAttributes = [...];
}

```

To automatically validate model attributes on Eloquent save, set `$validateOnSave` to `true`. This behavior is disabled by default.

### Advanced Configuration

[](#advanced-configuration)

For dynamic configuration, implement the configuration accessor functions instead of setting the attributes. This allows you to apply custom logic around the values that are used in the Validator under the hood.

```
class YourModel implements IValidatable {
    use Validatable;

    public getValidateOnSave(): bool {
        return true;
    }

    public getValidationData(): array {
        return [...];
    }

    public getValidationRules(): array {
        return [...];
    }

    public getValidationMessages(): array {
        return [...];
    }

    public getValidationCustomAttributes(): array {
        return [...];
    }
}

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~84 days

Recently: every ~117 days

Total

11

Last Release

873d ago

Major Versions

0.0.0 → 1.0.0-rc.12021-08-26

1.0.1 → 2.0.0-rc.12022-09-07

2.x-dev → 3.0.02023-04-10

PHP version history (2 changes)0.0.0PHP ^7.3|^8.0

2.0.0-rc.1PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89610601?v=4)[moves-ext-devs](/maintainers/moves-ext-devs)[@moves-ext-devs](https://github.com/moves-ext-devs)

---

Top Contributors

[![danalamo](https://avatars.githubusercontent.com/u/6430396?v=4)](https://github.com/danalamo "danalamo (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moves-eloquent-validatable/health.svg)

```
[![Health](https://phpackages.com/badges/moves-eloquent-validatable/health.svg)](https://phpackages.com/packages/moves-eloquent-validatable)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

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

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)

PHPackages © 2026

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