Download the PHP package aminevsky/laravel-validation-rule-formatter without Composer
On this page you can find all versions of the php package aminevsky/laravel-validation-rule-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aminevsky/laravel-validation-rule-formatter
More information about aminevsky/laravel-validation-rule-formatter
Files in aminevsky/laravel-validation-rule-formatter
Download aminevsky/laravel-validation-rule-formatter
More information about aminevsky/laravel-validation-rule-formatter
Files in aminevsky/laravel-validation-rule-formatter
Vendor aminevsky
Package laravel-validation-rule-formatter
Short Description A Formatter of Laravel Validation Rule
License MPL-2.0
Package laravel-validation-rule-formatter
Short Description A Formatter of Laravel Validation Rule
License MPL-2.0
Please rate this library. Is it a good library?
Informations about the package laravel-validation-rule-formatter
A Formatter of Laravel Validation Rule
Requirements
- PHP ^7.3
- Laravel ^7.0 | ^8.0
Installation
Features
This formats validation rules that are passed to Laravel's validator.
Classes and Methods
ValidationRuleFormatter
addRule()
Add a rule for specified attribute.
- Parameters
- Attribute
- (Required) String
- Attribute Name that the rule applies to
- Rule Name
- (Required) String
- Rule name (ex.
required
,max
) - Rule Parameters
- (Optional) Mixed, Variable arguments
- Parameters for the rule
- Return value
- Self (
ValidationRuleFormatter
instance)
- Self (
format()
Return formatted rules.
- Parameters
- None
- Return value
- Array
- This can be passed to Laravel's validator
Example
Before
Without this library, you would write like this:
After
With this library, you can write like this:
All versions of laravel-validation-rule-formatter with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.3
The package aminevsky/laravel-validation-rule-formatter contains the following files
Loading the files please wait ....