PHPackages                             laraorvite/eloquent-wildcard-validator - 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. laraorvite/eloquent-wildcard-validator

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

laraorvite/eloquent-wildcard-validator
======================================

Fixes ErrorException: Indirect modification of overloaded property in Laravel nested validation.

1.0(1mo ago)111MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI passing

Since Apr 13Pushed 1mo agoCompare

[ Source](https://github.com/LaraOrVite/eloquent-wildcard-validator)[ Packagist](https://packagist.org/packages/laraorvite/eloquent-wildcard-validator)[ RSS](/packages/laraorvite-eloquent-wildcard-validator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Eloquent Wildcard Validator
===========================

[](#eloquent-wildcard-validator)

[![Tests](https://github.com/laraorvite/eloquent-wildcard-validator/actions/workflows/run-tests.yml/badge.svg)](https://github.com/laraorvite/eloquent-wildcard-validator/actions)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

This package fixes the `ErrorException: Indirect modification of overloaded property` that occurs in Laravel when performing wildcard validation on nested data structures containing Eloquent models or objects with magic methods.

The Problem
-----------

[](#the-problem)

In Laravel core, when you validate nested data using wildcards (e.g., `tickets.*.people.*.email`), the validator attempts to initialize missing data. If the data contains Eloquent models, PHP throws an error because magic methods (`__get` and `__set`) do not support indirect modification by reference.

The Solution
------------

[](#the-solution)

This package transparently extends the Laravel Validator to ensure that all data is safely converted to a plain array (arrayified) before validation begins, preventing any illegal modification of model properties while preserving the original data integrity.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require laraorvite/eloquent-wildcard-validator
```

The package will automatically register its Service Provider.

Usage
-----

[](#usage)

No additional configuration is required. Use the Laravel `Validator` facade or `$request->validate()` as you normally would:

```
$data = [
    'orders' => Order::with('items')->get()
];

$request->validate([
    'orders.*.items.*.price' => 'required|numeric'
]);
```

Credits
-------

[](#credits)

- [LaraOrVite](https://github.com/LaraOrVite)
- Special thanks to the Laravel community.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance89

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

57d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/139a52bbcc50fb98db10ce630131413e08ce12ab0752f0b195a1e1ca7bdca390?d=identicon)[niduranga](/maintainers/niduranga)

---

Top Contributors

[![niduranga](https://avatars.githubusercontent.com/u/183077965?v=4)](https://github.com/niduranga "niduranga (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laraorvite-eloquent-wildcard-validator/health.svg)

```
[![Health](https://phpackages.com/badges/laraorvite-eloquent-wildcard-validator/health.svg)](https://phpackages.com/packages/laraorvite-eloquent-wildcard-validator)
```

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

762621.7k17](/packages/wendelladriel-laravel-validated-dto)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8733.1M23](/packages/yajra-laravel-oci8)[sunspikes/clamav-validator

Custom Laravel anti-virus validator for file uploads using ClamAV.

3712.0M5](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.3M6](/packages/laravel-validation-rules-credit-card)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)

PHPackages © 2026

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