© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
3 replies
BBQfun

How to modify data before validation in simple(modal) resource

beforeValidate()
beforeValidate()
is working on normal resource page, but it didn't work on simple(modal) resource

i can't see
dd()
dd()
message after submit the form in the modal

class ManagePosts extends ManageRecords
{
    protected function beforeValidate(): void
    {
        dd('hello');

        if (isset($this->data['title']) && is_string($this->data['title'])) {
            $this->data['title'] = Str::squish($this->data['title']);
        }
    }
}
class ManagePosts extends ManageRecords
{
    protected function beforeValidate(): void
    {
        dd('hello');

        if (isset($this->data['title']) && is_string($this->data['title'])) {
            $this->data['title'] = Str::squish($this->data['title']);
        }
    }
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to modify data before saving in simple modal.
FilamentFFilament / ❓┊help
3y ago
Modal Open before validation
FilamentFFilament / ❓┊help
3y ago
Simple Resource Modal Width
FilamentFFilament / ❓┊help
3y ago
Simple resource. Before create
FilamentFFilament / ❓┊help
3y ago