craftcms/laravel-ruleset-validation
Validate Laravel request data against Craft CMS field rulesets. Map Craft-style constraints (required, min/max, regex, etc.) into Laravel’s validator, keeping validation logic consistent between Craft and Laravel apps.
->withScenario methodIf you only want to switch scenarios for one operation, use withScenario(). The previous scenario is restored after the callback returns or throws.
$validated = $data->ruleset->withScenario(
PostRuleset::SCENARIO_DRAFT,
fn () => $data->ruleset->validate(),
);
Full Changelog: https://github.com/craftcms/laravel-ruleset-validation/compare/1.0.2...1.1.0
Full Changelog: https://github.com/craftcms/laravel-ruleset-validation/compare/1.0.1...1.0.2
Full Changelog: https://github.com/craftcms/laravel-ruleset-validation/compare/1.0.0...1.0.1
Full Changelog: https://github.com/craftcms/laravel-ruleset-validation/commits/1.0.0
How can I help you explore Laravel packages today?