hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT] Improve Validation Logic for File Uploads in Admin Forms #1176

Open DemDem-code opened 3 months ago

DemDem-code commented 3 months ago

## Description Validation errors are being encountered when admin users attempt to upload files through the dashboard. The current validation logic fails to process file uploads correctly, resulting in frequent errors that disrupt workflow.

Purpose: Ensure reliable file upload functionality within admin forms to prevent disruptions in admin tasks and improve overall user experience.

Acceptance Criteria:

Validation errors are resolved for all supported file types during upload. Files are correctly uploaded without triggering unnecessary validation warnings. Admins receive clear and accurate feedback when a file fails to meet validation criteria. Updated validation logic supports all file size limits and formats as per guidelines. Testing confirms that no new issues are introduced after adjustments.

Requirements: Review current validation logic in admin form handlers. Implement changes to properly handle various file types and sizes. Ensure feedback messages for failed uploads are user-friendly and informative. Test the updated validation process across multiple scenarios (e.g., different file types, sizes). Document changes and update the admin user guide as necessary.

Expected Outcome: Admin users will be able to upload files through the dashboard without encountering validation errors, leading to a smoother and more efficient admin experience.