There is no license information available for the latest version (dev-master) of this package.

dev-master 2015-06-02 15:12 UTC

This package is auto-updated.

Last update: 2022-09-13 18:39:38 UTC


Laravel 5 bundle for validate in models.

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


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


In the rules array use the laravel validator formats.

class CustomModel extends Eloquent {
    use ModelValidationTrait;

    public $rules = array(
        'attribute' => 'required',

$customModel = new CustomModel();

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