From a8ad8e2aba9bac6f12197a6ee9aec9b4412898d8 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 15 Apr 2026 10:27:37 +0530 Subject: [PATCH] Updated validation logic to allow invoice file size should be less than or equal to 50 KB --- app/Filament/Resources/InvoiceValidationResource.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Filament/Resources/InvoiceValidationResource.php b/app/Filament/Resources/InvoiceValidationResource.php index fcea90b..b004d69 100644 --- a/app/Filament/Resources/InvoiceValidationResource.php +++ b/app/Filament/Resources/InvoiceValidationResource.php @@ -409,7 +409,8 @@ class InvoiceValidationResource extends Resource 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // 'application/vnd.ms-excel', // Legacy .xls fallback if needed ]) - ->rules(['mimes:xlsx']) // Laravel validation: extension check + ->rules(['mimes:xlsx', 'max:50']) // Laravel validation: extension check + ->maxSize(50) ->preserveFilenames() // <- this keeps the original filename ->reactive() ->storeFiles(false) // prevent auto-storing, we will store manually @@ -758,7 +759,8 @@ class InvoiceValidationResource extends Resource 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // 'application/vnd.ms-excel', // Legacy .xls fallback if needed ]) - ->rules(['mimes:xlsx']) // Laravel validation: extension check + ->rules(['mimes:xlsx', 'max:50']) // Laravel validation: extension check + ->maxSize(50) ->preserveFilenames() // <- this keeps the original filename ->reactive() ->storeFiles(false) // prevent auto-storing, we will store manually