Srccode
Srccode
FFilament
Created by Srccode on 5/21/2024 in #❓┊help
Custom Validation Rule not showing failure message in File upload field.
Hello all. I was trying to make a custom validation rule for a file upload field, but this was returned instead of the correct error message: Illuminate\Validation\ClosureValidationRule. So i thought of making a rule class but when I do that the path of the rule is returned instead. Below is my code for the file upload field:
Forms\Components\FileUpload::make('data')
->required()
->maxSize(128000)
->rules([new DataValidationRule()])
->hidden(function (Get $get) {
$type = $get('type');
return $type === TypeEnum::WITH_WEIGHTS->value;
}),
Forms\Components\FileUpload::make('data')
->required()
->maxSize(128000)
->rules([new DataValidationRule()])
->hidden(function (Get $get) {
$type = $get('type');
return $type === TypeEnum::WITH_WEIGHTS->value;
}),
4 replies
FFilament
Created by Srccode on 4/30/2024 in #❓┊help
Open a Modal when user logs in
Hello. I have a custom livewire component modal that i want to show every time a user logs in on the dashboard page but I cant figure out how to dispatch the event to trigger the opening of thew modal. Any help will be appreciated. This is how I am rendering the modal view in my provider: return $panel ->default() ->id('admin') ....... ->plugins([ FilamentShieldPlugin::make() ]) ->renderHook( 'panels::auth.login.form.after', fn () => view('auth.socialite.google') ) ->renderHook( PanelsRenderHook::CONTENT_END, function (): View { return view('livewire.set-username'); } );
22 replies
FFilament
Created by Srccode on 4/24/2024 in #❓┊help
Open a blocking modal on login based on a condition.
Hello! I was wondering if there is any way to open a form modal that would block the user from using anything else in the app, based on if the username for the logged in user is set or not? I have two ways to register, one normal way using username and password and one using google. Using the google flow, the username is not saved.
2 replies