PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Please post image validation code

  1. I have seen several people asking how to validate images on user upload. Most of them require, like I do, to only allow images of a minimum size. It would be nice to exclude images over a maximum as well.

    It would be really great to have these options right in the Gravity Forms field editor. Validating an image or filtering by filetype of size seems like a very common request.
    Several moderators have pointed us to using the hooks to validate. I really don't have the time to figure out the PHP necessary to validate my image size using these hooks.
    Would it be possible for someone who knows exactly how to do this to simply post an example of how we can use these hooks to validate or image size?

    I'm sure many of us paid users would appreciate the help.
    Thank you.

    Posted 12 years ago on Friday May 18, 2012 | Permalink
  2. Hmmm. I thought for sure other Gravity Forms users wanted to be able limit size of image uploads or otherwise validate files using the GF uploader. I've seen other threads to that effect.

    Add your comment if you'd like this feature and maybe we can convince the developers to help us out.

    Patrick

    Posted 12 years ago on Thursday May 24, 2012 | Permalink
  3. Cirfzen
    Member

    Yes. This would be a great feature. I am having the same problem.
    Found this after some "googling":
    http://zzlatev.com/gravity-forms-upload-limits/
    Tested it and it works great! But it is just for image-size. So next thing to do is add a check-if-this-is-a-image check.

    Posted 12 years ago on Thursday May 24, 2012 | Permalink