© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Yasser

Disable Validation for other locales

Hello everyone,
We have been looking for a while now....

Context
- Several Resources, Translatable (Using Filament plugins, json columns and Spatie translatable)
- Our other locales are 'optional'

Issue
The first time a field is filled (edit record), the validation triggers on the forms for the other locales.

Question
Is there a way to ignore any validation on the forms of the 'non' active locale. Or , to somehow (before validation) Fill the other forms's data with the default locale ones if they are empty ?

Extra
During my debugging I also found a qwerk in:
// This trait -> 
Filament\Resources\Pages\EditRecord\Concerns\Translatable

// This Method -> 
public function save(bool $shouldRedirect = true):void
{
// ... Code
        // $this->activeLocale tends to return null if using the default locale
        $originalActiveLocale = $this->activeLocale;
// ... Code
      // If my active locale = 'en' it's still included
        $otherTranslatableLocales = Arr::except($this->getTranslatableLocales(), $originalActiveLocale);
     // Replacing this line with the equivalent?! does get me what's expected
            $otherTranslatableLocales = array_filter(fn($locale)=>$locale!==$originalActiveLocale, $otherTranslatableLocales);
}
// This trait -> 
Filament\Resources\Pages\EditRecord\Concerns\Translatable

// This Method -> 
public function save(bool $shouldRedirect = true):void
{
// ... Code
        // $this->activeLocale tends to return null if using the default locale
        $originalActiveLocale = $this->activeLocale;
// ... Code
      // If my active locale = 'en' it's still included
        $otherTranslatableLocales = Arr::except($this->getTranslatableLocales(), $originalActiveLocale);
     // Replacing this line with the equivalent?! does get me what's expected
            $otherTranslatableLocales = array_filter(fn($locale)=>$locale!==$originalActiveLocale, $otherTranslatableLocales);
}
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

Disable all browser validation
FilamentFFilament / ❓┊help
15mo ago
disable or fix fileupload validation
FilamentFFilament / ❓┊help
16mo ago
Disable validation (when save as concept)
FilamentFFilament / ❓┊help
12mo ago
With disableOptionWhen disable all other option
FilamentFFilament / ❓┊help
3y ago