New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

laravel-validation-rules/ip

Validate if an ip address is public or private.
29,777 16
Install
composer require laravel-validation-rules/ip
Latest Version:1.6.0
Laravel:5 – 8
License:Apache-2.0
Last Updated:Dec 28, 2021
Links: GitHub  ·  Packagist
Maintainer: clarkeash

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

claraleigh/naughty-username

Validate that a username is not a naughty one

24,348 0
cohensive/validation

Extra functionality for Laravel 5 Validator.

13,938 14
jedrzej/validator-extended-syntax

Laravel 4/5 package that adds validator negation to Laravel's validation module

11,595 3
shin1x1/laravel-validator-builder

Laravel 4 Validator builder

7,436 2
digitonic/validation

A Laravel custom validation package with some out of the box validators.

2,526 2

Version History

Version Released Laravel License
1.6.0 ^5.5|^6.0|^7.0|^8.0 Apache-2.0
1.5.0 ^5.5|^6.0|^7.0|^8.0 Apache-2.0
1.4.0 ^5.5|^6.0|^7.0|^8.0 Apache-2.0
1.3.0 ^5.5|^6.0|^7.0 Apache-2.0
v1.2.0 ^5.5|^6.0 Apache-2.0