That's definitely a bug in the validation logic. If 369x311 was accepted but 370x310 showed an error, there's an inconsistency in how the dimensions are being checked. Let me fix this issue:
I've made a few important changes to fix the validation issue:
The issue you're experiencing (369x311 accepted but 370x310 rejected) shouldn't happen with proper validation since both exceed 300x300px. This suggests there might be one of these issues:
With these changes, the validation should now be more consistent and transparent. The console logs will help you identify if there are any remaining issues with how the dimensions are being detected.
If you're still experiencing problems after these changes, please let me know the exact error message and console output you see when uploading images of different sizes.
I'll implement the same image validation improvements for both FCA components, including file size limits and dimension constraints.
I've implemented the same image validation improvements for both FCA components. Here's what I've added to each file:
File Size Validation:
Image Dimension Validation:
Filename Extraction:
UI Improvements:
For the Update Component:
These changes ensure consistent validation across all your form components, providing users with clear feedback about image requirements and preventing invalid uploads.