sandermuller/laravel-fluent-validation
Type-safe, IDE-autocomplete Laravel validation rule builders. Create rules fluently without memorizing strings; each rule exposes only valid methods. Define nested array validation with each()/children(). Optional HasFluentRules trait speeds wildcard validation dramatically (up to 160x).
rules(), messages(), and attributes() arrays).Adopt if:
'required|string|min:2|max:255').items.*.id) and performance is critical.FluentRule::string()->min(2)).Look elsewhere if:
"This package modernizes Laravel validation from error-prone string syntax to IDE-friendly, type-safe builders—like upgrading from SQL strings to query builders. For high-volume endpoints (e.g., bulk imports), it delivers 160x faster wildcard validation, reducing latency and scaling costs. The migration tool automates 80% of the rewrite, so we can adopt this incrementally without disrupting sprints. It’s a low-risk DX upgrade with measurable performance wins."
Key Metrics to Track:
min:5 rules)."FluentValidation replaces Laravel’s string-based rules with fluent builders like FluentRule::string()->min(2)->max(255), offering:
min:5 vs. max:5 or unique:users,email,id.Use it for:
items.*.id validation in imports).Avoid it for:
required|email).Migration Effort: Low to moderate (Rector handles 80%; manual tweaks for edge cases)."*
How can I help you explore Laravel packages today?