Home › Forums › Front-end Issues › Acf_form() image minimum size validation not working anymore
For some reason this has stopped working (5.5 PRO). I set the minimum image size and now it no longer fails validation on the front end. It will just drop the image.
In admin it will still validate correctly however.
Which min size, height, width or file size? I just did a quick test with height and width and validation seems to be working for both height and width, logged in using the wp media uploader and logged out using the alternate file upload field.
Are you seeing any JavaScript errors?
Are there any php errors happening during the upload request? Turn on error logging https://codex.wordpress.org/Debugging_in_WordPress
Try deactivating other plugins to see if there are any conflicts. Try switching to a default theme.
Thanks for your tips – tried them but still no success. Is odd as all other validation works as expected. It was working prior to the 5.5 upgrade as remember “thinking that’s pretty cool one less thing I need to code up myself” 🙂
Works fine when logged in as admin – as soon as I try as a public user it no longer detects the min width restriction.
It was set to min width detection only. Here is my form if that helps:
https://www.winprizesnow.com/submit-a-competition/
I have tried:
– Changing theme to twenty fifteen and testing it on that theme
– Removing all other JS from the page
– Debugging was on – no errors
– Removed all my custom validation rules from functions
– Can’t see any errors in the console.
If you have debugging on this will not show you any errors that may be happening during the ajax request. Did you have WP_DEBUG_LOG set to true and look in the log file?
Hi John, Yes I had debugging turned on. I resolved a few errors/notices from other plugins – but this didn’t solve this issue unfortunately.
No other errors being logged now.
Since it’s working for me I suspect that there is still an error somewhere. At this point I’m going to suggest opening a new support ticket https://support.advancedcustomfields.com/new-ticket/
The topic ‘Acf_form() image minimum size validation not working anymore’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.