laravel-validation-rules/ip
IP
Validates an ip address is either public or private. Supports ipv4 & ipv6.
Installation
composer require laravel-validation-rules/ip
Usage
Validate an ip address is a public address.
use LVR\IP\PublicAddress;
$request->validate([
'ip' => ['required', new PublicAddress],
]);
Validate an ip address is a private address.
use LVR\IP\PrivateAddress;
$request->validate([
'ip' => ['required', new PrivateAddress],
]);
Related Packages
skysplit/laravel5-intl-translation
Laravel 5 package for better translation syntax using php-intl extension
107,504
10
propaganistas/laravel-phone
Adds phone number functionality to Laravel based on Google's libphonenumber API.
45,553,865
3,041
proengsoft/laravel-jsvalidation
Validate forms transparently with Javascript reusing your Laravel Validation Rul...
2,476,565
1,141
pixelpeter/laravel5-isocodes-validation
Laravel 5 wrapper for the IsoCodes Validation library from ronanguilloux
87,981
19
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 1.6.0 | ^5.5| | Apache-2.0 | |
| 1.5.0 | ^5.5| | Apache-2.0 | |
| 1.4.0 | ^5.5| | Apache-2.0 | |
| 1.3.0 | ^5.5| | Apache-2.0 | |
| v1.2.0 | ^5.5| | Apache-2.0 | |
| v1.0.0 | ^5.5 | Apache-2.0 |