Download the PHP package saritasa/laravel-fluent-validation without Composer
On this page you can find all versions of the php package saritasa/laravel-fluent-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saritasa/laravel-fluent-validation
More information about saritasa/laravel-fluent-validation
Files in saritasa/laravel-fluent-validation
Package laravel-fluent-validation
Short Description Set of fluent builders for Laravel request validation rules
License MIT
Informations about the package laravel-fluent-validation
Fluent Validation Rules builders for Laravel
Use fluent-style syntax to build Laravel validation rules
Example:
Advantages
- Strong typing
- Intellisence for available rules and parameters (if you use smart IDE, like PHPStorm)
- Hints about mistypings (if you use smart IDE, like PHPStorm)
Examples
Inline documentation:
Intellisence:
Custom validation rules
You can also use custom declared validations:
Installation
Install the package:
If you use Laravel 5.4 or less,
or 5.5+ with package discovery disabled,
add the FluentValidationServiceProvider in config/app.php
:
Note: You can omit service provider registration, but then you must call ->toString() or ->toArray() on each builder. If service provider is registered, manual casting of rule to string or array is not necessary and default Laravel's Illuminate\Validation\ValidationServiceProvider::class can be removed from 'providers' array.
Available classes
\Saritasa\Laravel\Validation\Rule
Root of your rule builder.
Contributing
- Create fork, checkout it
- Develop locally as usual. Code must follow PSR-1, PSR-2 - run PHP_CodeSniffer to ensure, that code follows style guides
- Cover added functionality with unit tests and run PHPUnit to make sure, that all tests pass
- Update README.md to describe new or changed functionality
- Add changes description to Semantic Versioning convention to determine next version number.
- When ready, create pull request
Make shortcuts
If you have GNU Make installed, you can use following shortcuts:
- (instead of ) - run static code analysis with PHP_CodeSniffer to check code style
- (instead of ) - fix code style violations with PHP_CodeSniffer automatically, where possible (ex. PSR-2 code formatting violations)
- (instead of ) - run tests with PHPUnit
-
- instead of
- or just without parameters - invokes described above install, cs, test tasks sequentially - project will be assembled, checked with linter and tested with one single command
Resources
- Bug Tracker
- Code
- Changes History
- Authors
All versions of laravel-fluent-validation with dependencies
illuminate/database Version ^5.4 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
illuminate/support Version ^5.4 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
illuminate/validation Version ^5.4 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
saritasa/php-common Version ^1.0
propaganistas/laravel-phone Version ^3.0 || ^4.0 || ^5.0