Title: Wrong validation error when uploading files larger than PHP limit
Last modified: January 28, 2020

---

# Wrong validation error when uploading files larger than PHP limit

 *  [ewithesbjerg](https://wordpress.org/support/users/ewithesbjerg/)
 * (@ewithesbjerg)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/)
 * After extensive testing, I have discovered the following bug:
 * The file upload size for the server is set to 8 MB.
    I set the max size in my
   form to 7 MB.
 * If I try to upload a file larger than 7 MB but smaller than 8 MB, I get the correct
   validation error.
    If I try to upload a file larger than 8 MB, I get validation
   errors on ALL mandatory fields… except the file upload field. Oh, the irony.
 * Is this a known error and if yes, does a known fix exist?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12375410)
 * Where can we see the website?
 *  Thread Starter [ewithesbjerg](https://wordpress.org/support/users/ewithesbjerg/)
 * (@ewithesbjerg)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12375911)
 * Hi,
 * sorry, forgot the link, you can check it out here: [https://ewimed.com/contact-form-test/](https://ewimed.com/contact-form-test/)
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12376334)
 * What other plugins and theme do you use on the site?
 *  Thread Starter [ewithesbjerg](https://wordpress.org/support/users/ewithesbjerg/)
 * (@ewithesbjerg)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12376409)
 * In also get this error in the console when trying:
    Uncaught TypeError: Cannot
   read property ‘dispatchEvent’ of undefined at Object.wpcf7.triggerEvent (scripts.
   js?ver=5.1.6:367) at ajaxSuccess (scripts.js?ver=5.1.6:257) at Object.<anonymous
   > (scripts.js?ver=5.1.6:350) at i (jquery.js?ver=1.12.4-wp:2) at Object.fireWith[
   as resolveWith] (jquery.js?ver=1.12.4-wp:2) at x (jquery.js?ver=1.12.4-wp:4) 
   at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4)
 * Theme: Uncode
 * Plugins:
    Akismet Anti-Spam Borlabs Cookie – Cookie Opt-in Category Order and
   Taxonomy Terms Order Contact Form 7 Contact Form 7 Multilingual Contact Form 
   CFDB7 Enable Media Replace Find Posts Using Attachment Honeypot for Contact Form
   7 HTTP Headers iThemes Security LayerSlider WP Listo LiteSpeed Cache PHP native
   password hash Really Simple SSL ReCaptcha v2 for Contact Form 7 Redirection Simple
   History Slider Revolution Smush SVG Support The Events Calendar The Events Calendar
   Shortcode & Block Uncode Core Uncode Dave’s WordPress Live Search (4.4.1) Uncode
   Privacy Uncode WPBakery Page Builder VC Particles Background Verwandte Beiträge
   für WordPress WP Mail SMTP WP Rollback WPBakery Page Builder (Visual Composer)
   Clipboard WPML Media WPML Multilingual CMS WPML String Translation WPML Translation
   Management Yoast SEO Yoast SEO Multilingual
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12377648)
 * Try [switching to the default theme and deactivating all other plugins](https://contactform7.com/2019/12/02/why-you-are-advised-to-deactivate-plugins-and-switch-to-the-default-theme/)
   excluding Akismet Anti-Spam, Listo, and Yoast SEO.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Wrong validation error when uploading files larger than PHP limit’ is
closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [themeforest](https://wordpress.org/support/topic-tag/themeforest/)

 * 5 replies
 * 2 participants
 * Last reply from: [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/wrong-validation-error-when-uploading-files-larger-than-php-limit/#post-12377648)
 * Status: not resolved