Download the PHP package laraorvite/eloquent-wildcard-validator without Composer
On this page you can find all versions of the php package laraorvite/eloquent-wildcard-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laraorvite/eloquent-wildcard-validator
More information about laraorvite/eloquent-wildcard-validator
Files in laraorvite/eloquent-wildcard-validator
Package eloquent-wildcard-validator
Short Description Fixes ErrorException: Indirect modification of overloaded property in Laravel nested validation.
License MIT
Informations about the package eloquent-wildcard-validator
Eloquent Wildcard Validator
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
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
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
You can install the package via composer:
`
The package will automatically register its Service Provider.
Usage
No additional configuration is required. Use the Laravel Validator facade or $request->validate() as you normally would:
Credits
- LaraOrVite
- Special thanks to the Laravel community.
License
The MIT License (MIT). Please see License File for more information.
All versions of eloquent-wildcard-validator with dependencies
illuminate/validation Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0