© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
15 replies
darrenm

FileUpload field validation passes on upload but fails on submit

Hello Filament people!

Working on my first project and have a curious problem with a
FileUpload
FileUpload
field.

I'm allowing upload of a favicon and am validating using

->acceptedFileTypes([
    'image/vnd.microsoft.icon',
])
->acceptedFileTypes([
    'image/vnd.microsoft.icon',
])


This works just fine for the upload task - so I believe the mime type is correct. When the form is submitted, it fails with a
validation.mimetypes
validation.mimetypes
error. Using a
->image()
->image()
validation works fine. Not sure what's going on here - I'd prefer to restrict to just .ico files.

filament forms v3.2.100, Ubuntu 2204/ PHP8.3 host
Solution
yeah I've been thinking that might be the workaround. I can see a hint that it's getting turned into an octet stream during the submission process.

But I've got over it for now with
->rules(['extensions:ico,png']) 
->rules(['extensions:ico,png']) 
(although that doesn't work on the client side)
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

FileUpload file validation after upload, before submit
FilamentFFilament / ❓┊help
13mo ago
Custom FileUpload state validation after upload
FilamentFFilament / ❓┊help
6mo ago
FileUpload randomly fails to upload on Laravel Vapor
FilamentFFilament / ❓┊help
17mo ago
validation.in on form submit
FilamentFFilament / ❓┊help
6mo ago