Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Validation Composite

Validation Composite Laravel Package

illuminatech/validation-composite

Illuminatech Validation Composite lets Laravel developers build custom validation rules by composing existing rules into one reusable rule. Define nested rules and messages, keep validation logic modular, and use the result like any standard Laravel validation rule.

View on GitHub
Deep Wiki
Context7

Allows uniting of several validation rules into single one for easy re-usage

Frequently asked questions about Validation Composite
What is illuminatech/validation-composite used for in Laravel?
It lets Laravel developers combine several existing validation rules into one reusable rule so repeated rule sets do not have to be copied across form requests and rule classes. You define the nested rules and messages once, then use the composite like any standard Laravel validation rule. It is a thin validation-layer abstraction rather than a replacement validation engine, so it fits best in Laravel apps already using form requests and custom Rule objects.
How do I install illuminatech/validation-composite?
Install it with Composer using composer require illuminatech/validation-composite, then let Laravel package discovery register the service provider as described in the README. Check the package composer.json constraints against your PHP and Laravel versions before adopting it. Pin the version in composer.json and commit the lock file so upgrades are deliberate.
Which PHP and Laravel versions does illuminatech/validation-composite support?
The supported PHP and Laravel matrix depends on the package release, so verify the constraints in composer.json and the README on GitHub or Packagist before adoption. Pin a version that matches your current Laravel LTS or non-LTS target and add a CI matrix for the combinations you support. Because community adoption and maintenance signals are modest, confirm the latest release actually supports your framework version instead of assuming backward compatibility.
How do I create a reusable composite validation rule?
Create a rule class that declares the nested validation rules and their messages, then reference that class from your form request or validator like any other rule. Start with one duplicated rule set, such as an address, payment, or identity check, and encode it as a composite. Keep the original rules in place until tests prove the composite produces the same pass/fail behavior and error output.
Can I use a composite rule inside Laravel form requests and custom Rule objects?
Yes, the intended use is inside Laravel form requests and custom Rule objects, alongside ordinary rules in the rules array. Integration is usually a Composer dependency plus normal Laravel package discovery, with no new runtime architecture. Pilot it in one bounded form request and verify error keys, messages, and attribute names before replacing other call sites.
How are validation error messages and attribute names handled by a composite rule?
The composite aggregates errors and messages from its nested rules under the parent attribute, so test how field-specific messages and custom attribute names appear in the final error bag. Pay particular attention to nested arrays and wildcard attributes, where key mapping can differ from a plain rule. Document the approved message conventions before standardizing the pattern across teams.
Does illuminatech/validation-composite support closures, Rule::when, custom rules, and exists or unique rules?
Support for closures, Rule::when, custom Rule objects, and database-backed rules such as exists and unique depends on the package version and how request context is passed through the composite. Test each rule type you rely on in a small harness, especially conditional and context-dependent rules. If your validation is dominated by highly dynamic rules, prove the composition model before rewriting production forms.
What license does illuminatech/validation-composite use, and is it safe for commercial use?
The repository has been assessed as NOASSERTION, meaning the actual license terms are unclear, which is a material blocker for commercial distribution until legal review confirms compatibility. Do not standardize the package across teams before that gate clears. If the license cannot be confirmed, treat the package as unusable for commercial code or look for an alternative with a clear license.
How do I test a composite validation rule in Laravel?
Write feature tests that submit valid and invalid input through Laravel's validator and assert both the pass/fail result and the exact error messages and keys. Cover nested arrays, optional fields, custom attribute names, and each rule type used inside the composite. Run those tests across your supported PHP and Laravel versions in CI and treat framework upgrades as a regression-test trigger.
Is illuminatech/validation-composite actively maintained, and what if I need to fork or replace it?
Adoption is modest at roughly 180 stars, so plan for limited upstream maintenance and fewer public examples or answers. Track releases, Laravel compatibility, and security advisories, assign an internal owner, and retain a fork or vendor option if the package is abandoned. Alternatives include native custom Rule classes and Laravel's nested validator arrays, so decide whether composition reuse justifies the extra dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager