# Laravel Fluent Validation Rector > Rector rules that migrate Laravel validation to `sandermuller/laravel-fluent-validation`, distributed as the Composer dev dependency `sandermuller/laravel-fluent-validation-rector`. Pipe-delimited strings, rule arrays, `Rule::` objects and Livewire `#[Rule]` attributes convert to FluentRule chains; a `SCHEMA` pass then trades the static prefix for an injected builder. Key properties an agent should know before running it: - **It bails rather than guesses.** A shape the rule cannot prove equivalent is left exactly as it was and written to the skip log. A partial conversion is the designed outcome, not a failure. - **The skip log is opt-in and cached.** Set `FLUENT_VALIDATION_RECTOR_VERBOSE=actionable` and pass `--clear-cache`, or a bailed file stays silent because Rector cached the no-op result. - **Three sets are deliberately not in `ALL`.** `SIMPLIFY`, `POLISH` and `SCHEMA` each run as their own `vendor/bin/rector process` invocation, after the previous one has been reviewed. Bundling them into one config is a documented mistake. - **The emit is not formatter-clean by design.** Run Pint or PHP-CS-Fixer afterwards; `ordered_imports`, `no_unused_imports` and `fully_qualified_strict_types` are what finish the job. - **Some rewrites change runtime behaviour**, and those are the ones the parity harness covers: promoting `field()` to a typed factory attaches an implicit `string` or `numeric` constraint that `FieldRule` did not have. Read the diff on `SIMPLIFY`. - **`#[FluentRules]` is a narrow per-method opt-in.** It does not lift the cross-class parent-safety scan, the Validator-subclass fold guard, or the denylist on framework hook methods. - **`SCHEMA` needs the whole inheritance chain in one run.** Converting a child while its parent stays on `rules()` produces `Call to undefined method parent::schema()`. ## Formats - [llms-full.txt](https://sandermuller.github.io/laravel-fluent-validation-rector/llms-full.txt): every page below, in reading order, in one fetch - Any page is also served as markdown at its own URL plus `.md` (for example [converters.md](https://sandermuller.github.io/laravel-fluent-validation-rector/converters.md)) ## Getting started - [Why this package?](https://sandermuller.github.io/laravel-fluent-validation-rector/why-this-package): What the migration converts, and what it deliberately leaves alone. - [Installation](https://sandermuller.github.io/laravel-fluent-validation-rector/installation): Requirements, and which version to pin against your fluent-validation. - [Getting started](https://sandermuller.github.io/laravel-fluent-validation-rector/getting-started): One config, three commands, and a diff worth reading. - [Sets](https://sandermuller.github.io/laravel-fluent-validation-rector/sets): The pipeline in pieces: CONVERT, GROUP, TRAITS, SIMPLIFY, POLISH. ## Conversion - [String and array converters](https://sandermuller.github.io/laravel-fluent-validation-rector/converters): Pipe strings, rule arrays, Rule:: objects and parent spreads. - [Livewire attributes](https://sandermuller.github.io/laravel-fluent-validation-rector/livewire): Strip #[Rule] / #[Validate] and generate a rules() method. - [Wildcard grouping](https://sandermuller.github.io/laravel-fluent-validation-rector/grouping): Fold flat wildcard and dotted keys into each() / children(). - [Trait insertion](https://sandermuller.github.io/laravel-fluent-validation-rector/traits): Add the right fluent-validation trait, including the Filament variant. ## After the migration - [Simplify](https://sandermuller.github.io/laravel-fluent-validation-rector/simplify): Promote factories, fold chains, and retire the ->rule() escape hatch. - [Docblock polish](https://sandermuller.github.io/laravel-fluent-validation-rector/polish): Narrow the @return on rules() once the conversion has stabilized. - [Adopting FluentSchema](https://sandermuller.github.io/laravel-fluent-validation-rector/schema): Trade the repeated FluentRule:: prefix for an injected builder. ## Control - [The #[FluentRules] attribute](https://sandermuller.github.io/laravel-fluent-validation-rector/fluent-rules-attribute): Opt a method in, and the safety guards the attribute does not lift. - [Configuration](https://sandermuller.github.io/laravel-fluent-validation-rector/configuration): The four configurable rectors, their wire keys, and the typed DTO builders. ## Operating it - [Formatter integration](https://sandermuller.github.io/laravel-fluent-validation-rector/formatter): Why the emit is not formatter-clean, and the three fixers that finish it. - [Diagnostics](https://sandermuller.github.io/laravel-fluent-validation-rector/diagnostics): The skip log, its verbosity tiers, and why the flag is env-only. - [Parity harness](https://sandermuller.github.io/laravel-fluent-validation-rector/parity): Proving the rewritten rules produce the same error bags at runtime. - [AI assistant integration](https://sandermuller.github.io/laravel-fluent-validation-rector/ai-assistant): The bundled Boost skill: set lists, rule architecture, and the shared-allowlist pattern an agent gets wrong without it. ## Reference - [Rule reference](https://sandermuller.github.io/laravel-fluent-validation-rector/rules-reference): Every rector, its set, and what it does — for registering one directly. - [Detection and limitations](https://sandermuller.github.io/laravel-fluent-validation-rector/limitations): What is detected without config, and what stays untouched.