softlogic-gt / laravel-validation-rules-container
A set of useful Laravel validation rules for shipping containers
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/softlogic-gt/laravel-validation-rules-container
Requires
- php: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0|^9.0|^10.0
README
This repository contains useful Laravel validation rules for shipping container numbers, based on: https://github.com/stormpat/Container-validator/blob/master/src/Validator/Validator.php
Installation
You can install the package via composer:
composer require softlogic-gt/laravel-validation-rules-container
The package will automatically register itself.
Translations
If you wish to edit the package translations, you can run the following command to publish them into your resources/lang
folder
php artisan vendor:publish --provider="SoftlogicGT\ValidationRulesContainer\ValidationRulesContainerServiceProvider"
Available rules
Container
Determine if the field under validation is a valid shipping container.
use SoftlogicGT\ValidationRulesContainer\Rules\Container; public function rules() { $rules = [ 'container' => ['required', new Container()], ]; $request->validate($rules) }