weap-io/laravel-validation-rules
A collection of Laravel validation rules
2,861
| Install | |
|---|---|
composer require weap-io/laravel-validation-rules |
|
| Latest Version: | v1.0.0 |
| PHP: | ^8.0 |
| License: | MIT |
| Last Updated: | May 28, 2022 |
| Links: | GitHub · Packagist |
Maintainer: saas-estate
laravel-validation-rules
A set of useful Laravel validation rules crafted and maintained by Weap.io.
Installation
Install the package:
composer require weap-io/laravel-validation-rules
Network
Hostname
Validate a hostname.
use Weap\LaravelValidationRules\Rules\Network\Hostname;
// Given input must be a valid hostname (with or without TLD)
return [
'host' => ['required', new Hostname()]
]
// Given input must be a valid hostname without TLD
return [
'host' => ['required', new Hostname($withTld = false)]
]
Port
Validate a port number.
use Weap\LaravelValidationRules\Rules\Network\Port;
// The input must be a valid port number (0 excluded)
return [
'port' => ['required', new Port()]
];
// The input must be a valid port number (0 included)
return [
'port' => ['required', new Port($allowZero = true)]
];
Bank
IBAN
Validate an IBAN.
use Weap\LaravelValidationRules\Rules\Bank\Iban;
return [
'iban' => ['required', new Iban()]
];
BIC
Validate a BIC.
use Weap\LaravelValidationRules\Rules\Bank\Bic;
return [
'bic' => ['required', new Bic()]
];
Services/Aws
S3 Bucket name
Validate an S3 Bucket name
use Weap\LaravelValidationRules\Rules\Services\Aws\S3BucketName;
return [
'bucket_name' => ['required', new S3BucketName()],
];
Related Packages
erirk/paypalpayment
laravel-paypalpayment is simple package help you process direct credit card paym...
0
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
631,580,251
9,707