sourcetoad/rule-helper-for-laravel
Fluent helpers for building Laravel validation rules. Use RuleSet to chain required/unique/max and add custom rules, or Rule for static rule builders. Supports reusable defined rule sets and extras like requiredIfAll/requiredIfAny for complex conditions.
Rule facade and Validator class, maintaining compatibility with Form Requests, API validation, and Artisan commands.RuleHelper::betweenDates(), RuleHelper::isValidEmailFormat()). No impact on DDD integration patterns.RuleHelper via RuleHelper::extend().v6.2.0 if not ready for Laravel 13.x. Monitor Laravel’s upgrade guide for breaking changes.PHP 8.1+ to ensure compatibility.v6.2.0?composer.json to sourcetoad/rule-helper-for-laravel:^6.3.composer update and test in a staging environment.Validator::extend() usage).Testing facade if applicable.v6.2.0.config('validation.use_rule_helper') = true).composer.json and run composer update.v6.2.0 or fork.Validator::extend() to override or debug rules.Validator::errors()->toArray().RuleHelper::isValidDocument()).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Laravel 13.x breaking changes | Validation failures | Test thoroughly; pin to v6.2.0 if needed. |
| PHP 8.5 type errors in custom rules | Runtime exceptions | Update custom rules to use PHP 8.5 types. |
| Package update introduces bugs | Regression in production | Test against dev branch before updating. |
| Overly complex rule timeouts | API timeouts | Add @timeout or split logic. |
v6.3.0 features (e.g., PHP 8.5 support).RuleHelper usage for new validation.How can I help you explore Laravel packages today?