somosyampi/laravel-validation
somosyampi/laravel-validation is a Laravel package that extends the framework's validation layer with reusable rules and helpers, making form and request validation cleaner, more consistent, and easier to maintain. It integrates with standard Laravel validators and error messages.
Architecture fit
Validator — it targets the well-known gap between HTTP-only FormRequest validation and validation needs in jobs, console commands, imports, queued webhooks, and domain/action classes. Architecturally that is a small, well-understood seam; it does not introduce a new runtime, container paradigm, or data layer.FormRequest + spatie/laravel-data; adopting it there would splinter the validation story across two idioms.Integration feasibility
Technical risk
illuminate/validation internals, and Laravel 11/12 changes to rule handling and error-bag behavior can break it silently. Last release predates recent majors — verify the constraint before anything else.Key questions for the engineering owner
FormRequest? If complement, what is the stated rule of thumb, and who enforces it?Rule objects, Rule::when/conditional rules, nested-array wildcards, bail, and localized messages behave identically to the framework validator? Where does it diverge?illuminate/* and PHP constraint, and does it install cleanly on our current Laravel minor?Stack fit
FormRequest is structurally unavailable and validation currently gets hand-rolled or skipped.FormRequest consistently, scope this to non-HTTP flows first. Do not run a framework-wide migration to prove a 0-star dependency.Migration path
FormRequest classes untouched, and measure whether the new idiom reduces duplication.Compatibility checks
spatie/laravel-data, prologue/alerts, any custom rule libraries) and confirm no service-provider or macro collisions.Sequencing
Rule object and one DB-touching rule.FormRequest.Maintenance
composer audit, Dependabot, and review of the fork diff rather than ecosystem signals.Support
Scaling
unique/exists rules hitting the database per-item inside bulk imports or queue workers. That is a pre-existing hazard, but a service-layer abstraction makes it easier to accidentally invoke validation per row at volume. Enforce batch validation for imports and watch query counts in load tests.Failure modes
bail behavior differing from the framework validator, producing API contract drift that tests don't catch because the package is used in only one path.FormRequests encode overlapping rules and drift apart, so the same payload validates differently depending on entry point. This is the most likely organizational failure and is not fixable by the package.Ramp-up
FormRequest boundary, or the package adds a second convention without removing the first. Treat that convention doc as a deliverable of the pilot, not an afterthought.How can I help you explore Laravel packages today?