Sonstrunz / laravel_autovalidation by Kimal

This package provides to autogenerate rules from database constraints with default message and autovalidate your model before save or update.
15
0
2
Package Data
Maintainer Username: Kimal
Maintainer Contact: raffaele.carelle@gmail.com (Raffaele)
Package Create Date: 2017-05-04
Package Last Update: 2017-08-18
Language: PHP
License: MIT
Last Refreshed: 2024-04-25 15:09:48
Package Statistics
Total Downloads: 15
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel Autovalidation

Installation

composer require raffaele/laravel_autovalidation

Usage Example

class YourModel extends raffaele\ValidationModel {

}

Disable automatic validate

Set in your model $autoValidate = false;

Array notValidate

If you wish exclude from validation some field, you have to add those to $notValidate = [] array.

Standard/custom validation message

Automatic validation uses the standarrd messages from laravel validation. If you want it's possibile use your custom messages, override $messages array.

Password and email fields

This fields have particolar rules, so if you have this fields thats have particolar name, please, help me to populate the
$passwordLabelCandidate and $emailLabelCandidate array.

Have fun! ;-)