occ-therapist/form-request-validation-for-filament
Reuse Laravel Form Requests inside Filament: attach one to a schema or table filter and its rules, messages, and attributes apply automatically to matching fields, with wildcard mapping, context-aware per-page rules, and smart rule merging.
composer show listing step so tests actually run| Dependency | Version |
|---|---|
| PHP | 8.2+ |
| Laravel | 12 or 13 |
| Filament | 4.x or 5.x |
prepareForValidation() support from v1.3.0 is unchanged.
Table::filtersFormRequest() — attach Form Requests to table filter formstableFilters.* and tableDeferredFilters.*deferFilters(false)): validation runs on filter changespublic function table(Table $table): Table
{
return $table
->filters([
Filter::make('created')->schema([
DatePicker::make('from'),
DatePicker::make('until'),
]),
])
->filtersFormRequest(
class: fn () => FilterCustomersRequest::class,
);
}
composer update occ-therapist/form-request-validation-for-filament
mountedActions.{n}.data.* state paths automaticallyStatePathNormalizer for robust state path → form request key mappingFormRequestSchemaRegistry::resolve() inherits config from parent schemas (wizard steps)composer update occ-therapist/form-request-validation-for-filament
Fixes a TypeError when Form Request rules are defined as pipe-separated strings:
'email' => 'required|email|max:255', // now supported
Previously only array syntax was supported:
'email' => ['required', 'email', 'max:255'],
composer update occ-therapist/form-request-validation-for-filament
Fixes a fatal error on Filament 5:
Declaration of FormRequestValidationHook::schema(Schema $schema) must be compatible with Component::schema(Closure|array $components)
The hook now resolves its parent schema via getContainer() instead of overriding Filament's schema() method.
composer update occ-therapist/form-request-validation-for-filament
Fixes a fatal error on PHP 8.3 / Filament 5:
Declaration of FormRequestValidationHook::make(string $name = ...) must be compatible with Field::make(?string $name = null)
composer update occ-therapist/form-request-validation-for-filament
First stable release. Use Laravel Form Request validation inside Filament schemas.
Schema::formRequest()items.*.name)rules(), messages(), and attributes()mergeInput)getFormRequestValidated() helper traitcomposer require occ-therapist/form-request-validation-for-filament
How can I help you explore Laravel packages today?