PHPackages                             umii/laravel-advance-validator-package - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. umii/laravel-advance-validator-package

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

umii/laravel-advance-validator-package
======================================

A Laravel package providing advanced validation rules beyond the default set.

v1.0.0(8mo ago)00MITPHPPHP &gt;=8.0

Since Aug 17Pushed 8mo agoCompare

[ Source](https://github.com/Umii010/umii-laravel-advance-validator-package)[ Packagist](https://packagist.org/packages/umii/laravel-advance-validator-package)[ RSS](/packages/umii-laravel-advance-validator-package/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

🌟 Umii Laravel Advance Validator Package
========================================

[](#-umii-laravel-advance-validator-package)

The **Umii Laravel Advance Validator Package** extends Laravel's validation system with extra validation rules that are not included by default.
It helps developers write cleaner, more secure, and user-friendly validation logic.

---

📑 Table of Contents
-------------------

[](#-table-of-contents)

- [Installation](#-installation)
- [Available Rules](#-available-rules)
- [Usage Example](#-usage-example)
- [Test JSON Payloads](#-test-json-payloads)
- [Validation Error Example](#-validation-error-example)
- [Configuration](#-configuration)
- [Why Use This Package?](#-why-use-this-package)
- [Changelog](#-changelog)
- [Author](#-author)
- [License](#-license)

---

🚀 Installation
--------------

[](#-installation)

**Install via Composer:**

```
composer require umii/laravel-advance-validator-package
```

Laravel will auto-discover the service provider.

**To publish the config file (optional):**

```
php artisan vendor:publish --tag=config
```

---

📜 Available Rules
-----------------

[](#-available-rules)

RuleDescription`strong_password`Must contain at least 8 characters, including uppercase, lowercase, number, and special character.`username`Only letters, numbers, underscores (3-20 characters).`phone`Valid phone number (supports international e.g. `+923001234567`).`iban`Validates IBAN (International Bank Account Number).`credit_card`Validates credit card number using Luhn algorithm.`base64_image`Ensures input is a valid Base64-encoded image (PNG, JPG, JPEG, GIF).`no_emoji`Rejects input containing emojis.`slug`Valid slug format (`my-page-slug`).`hex_color`Valid HEX color code (`#ffcc00` or `#fc0`).`geo_coordinate`Valid latitude/longitude (`37.7749,-122.4194`).`uuid_v7`Validates UUID version 7.`alpha_spaces`Only letters and spaces allowed.`disposable_email`Rejects disposable email addresses.`numeric_only`Only numbers allowed (no other characters).`alpha_num_spaces`Letters, numbers and spaces allowed.`letters_only`Only letters allowed (no numbers or special characters).`file_extension`Validates file extension against allowed list.`youtube_url`Validates YouTube URL.`twitter_handle`Validates Twitter handle (1-15 characters, optional @).`ip_address`Validates correct IPv4/IPv6 address.`json_string`Ensures input is valid JSON.`mac_address`Validates MAC address format.---

🛠 Usage Example
---------------

[](#-usage-example)

```
public function store(Request $request) {
    $validated = $request->validate([
        'name' => 'required|string|max:255|alpha_spaces|no_emoji',
        'username' => 'required|username|unique:users,username',
        'email' => 'required|email|disposable_email',
        'phone' => 'nullable|phone',
        'password' => 'required|strong_password|confirmed',
        'iban' => 'nullable|iban',
        'credit_card' => 'nullable|credit_card',
        'avatar' => 'nullable|base64_image',
        'profile_slug' => 'required|slug|unique:profiles,slug',
        'brand_color' => 'nullable|hex_color',
        'location' => 'nullable|geo_coordinate',
        'user_uuid' => 'nullable|uuid_v7',
        'age' => 'nullable|numeric_only',
        'bio' => 'nullable|alpha_num_spaces',
        'first_name' => 'nullable|letters_only',
        'document' => 'nullable|file_extension:pdf,doc,docx',
        'youtube_channel' => 'nullable|youtube_url',
        'twitter_username' => 'nullable|twitter_handle',
        'device_ip' => 'nullable|ip_address',
        'preferences' => 'nullable|json_string',
        'device_mac' => 'nullable|mac_address',
    ]);

    // Process validated data...
}
```

---

🧪 Test JSON Payloads
--------------------

[](#-test-json-payloads)

✅ **Valid Example:**

```
{
  "name": "John Doe",
  "username": "john_doe_123",
  "email": "john.doe@example.com",
  "phone": "+923001234567",
  "password": "StrongPass@123",
  "confirm_password": "StrongPass@123",
  "iban": "DE89370400440532013000",
  "credit_card": "4539578763621486",
  "avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
  "profile_slug": "john-doe-profile",
  "brand_color": "#ffcc00",
  "location": "37.7749,-122.4194",
  "user_uuid": "01890c9d-3b8a-7c42-9f1b-3c4e8f1e2b7a",
  "age": "30",
  "bio": "Software Developer with 5 years experience",
  "first_name": "John",
  "document": "report.pdf",
  "youtube_channel": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "twitter_username": "@johndoe",
  "device_ip": "192.168.1.1",
  "preferences": "{\"theme\":\"dark\",\"notifications\":true}",
  "device_mac": "00:1B:44:11:3A:B7"
}
```

❌ **Invalid Example (will trigger errors):**

```
{
  "name": "John 🚀",
  "username": "jd",
  "email": "temp@mailinator.com",
  "phone": "12345",
  "password": "weak",
  "confirm_password": "weak",
  "iban": "123456789",
  "credit_card": "111122223333444",
  "avatar": "data:text/plain;base64,SGVsbG8=",
  "profile_slug": "invalid slug!!",
  "brand_color": "blue",
  "location": "abc,xyz",
  "user_uuid": "not-a-uuid",
  "age": "30 years",
  "bio": "Special $characters!",
  "first_name": "John123",
  "document": "report.exe",
  "youtube_channel": "not-a-youtube-url",
  "twitter_username": "this_is_too_long_for_twitter",
  "device_ip": "999.999.999.999",
  "preferences": "not-json",
  "device_mac": "invalid-mac"
}
```

---

⚠️ Validation Error Example
---------------------------

[](#️-validation-error-example)

If invalid data is sent, Laravel will return errors like:

```
{
  "message": "The given data was invalid.",
  "errors": {
    "name": ["The name must not contain emojis."],
    "username": ["The username must be 3-20 characters and contain only letters, numbers, and underscores."],
    "email": ["Disposable email addresses are not allowed."],
    "password": ["The password must be at least 8 characters long, include upper/lowercase letters, a number, and a special character."],
    "iban": ["The IBAN must be a valid IBAN."],
    "credit_card": ["The credit card must be a valid credit card number."],
    "avatar": ["The avatar must be a valid Base64 encoded image."],
    "profile_slug": ["The profile slug must be a valid slug."]
  }
}
```

---

⚙️ Configuration
----------------

[](#️-configuration)

After publishing the configuration file, you can customize various validation rules:

```
// config/umii_advance_validator.php

return [
    'disposable_email_domains' => [
        'tempmail.com',
        'mailinator.com',
        '10minutemail.com',
        // Add more disposable domains as needed
    ],

    'allowed_file_extensions' => [
        'pdf', 'doc', 'docx', 'txt',
        'jpg', 'jpeg', 'png', 'gif',
        // Add more extensions as needed
    ],
];
```

---

💡 Why Use This Package?
-----------------------

[](#-why-use-this-package)

✔️ Eliminates repetitive regex rules in your projects
✔️ Provides strong password enforcement out of the box
✔️ Adds business-specific validation (IBAN, credit card, geo-coordinates, etc.)
✔️ Prevents common security issues (emoji injection, disposable emails)
✔️ Lightweight and fully integrates with Laravel validation system
✔️ Consistent error messages across projects
✔️ Easily extensible and configurable

---

📜 Changelog
-----------

[](#-changelog)

- **v1.0.0** – Initial Release 🎉

---

👨‍💻 Author
----------

[](#‍-author)

**Muhammad (Umii010)**
[GitHub](https://www.github.com/Umii010)

---

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the **MIT license**.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance58

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

269d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a63c961b7282bf04fc6c5ebdb5214753663dddf9c4ee0d24ac12c88db4f17dcd?d=identicon)[Umii010](/maintainers/Umii010)

---

Top Contributors

[![Umii010](https://avatars.githubusercontent.com/u/92120031?v=4)](https://github.com/Umii010 "Umii010 (7 commits)")[![umer0010](https://avatars.githubusercontent.com/u/175431167?v=4)](https://github.com/umer0010 "umer0010 (3 commits)")

### Embed Badge

![Health badge](/badges/umii-laravel-advance-validator-package/health.svg)

```
[![Health](https://phpackages.com/badges/umii-laravel-advance-validator-package/health.svg)](https://phpackages.com/packages/umii-laravel-advance-validator-package)
```

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
