Title: Validation Function Error
Last modified: October 12, 2016

---

# Validation Function Error

 *  [webcitymedia](https://wordpress.org/support/users/webcitymedia/)
 * (@webcitymedia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/)
 * Using iThemes Security 5.6.3
 * Trying to add another directory to Files and Folders List in File Change Detection
   throws the following errors.
 * 1. “A validation function for file-change received data that did not have the
   required entry for latest_changes.”
 * 2. “The settings could not be saved. Please correct the error above and try again.”
 * Deleted plugin and reinstalled with same issue. Unable to add any folders.

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

 *  Thread Starter [webcitymedia](https://wordpress.org/support/users/webcitymedia/)
 * (@webcitymedia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8284730)
 * Seeing this in all the sites we manage on different hosts.
 *  [dkseigler](https://wordpress.org/support/users/dkseigler/)
 * (@dkseigler)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8284770)
 * I am seeing the same error on the File Change Warning settings in my client sites.
 *  [pronl](https://wordpress.org/support/users/pronl/)
 * (@pronl)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8285106)
 * Oops, looks like something slipped through that should not have.
    Try and remove
   any code lines related to the ‘latest_changes’ setting in the following 2 files:**(
   Create backup copies first !)**
    - core\modules\file-change\scanner.php:
    -     ```
          $this->settings['latest_changes'] = array(
          	'added' => count( $files_added ),
          	'removed' => count( $files_removed ),
          	'changed' => count( $files_changed ),
          );
          ```
      
    - core\modules\file-change\settings.php:
    - `'latest_changes' => array(),`
 * Works for me 😉
    -  This reply was modified 9 years, 8 months ago by [pronl](https://wordpress.org/support/users/pronl/).
 *  [pronl](https://wordpress.org/support/users/pronl/)
 * (@pronl)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8299938)
 * … or update to 5.6.4 (released today).
    According to the 5.6.4 [Changelog](https://wordpress.org/plugins/better-wp-security/changelog/):
 * > Bug Fix: Fixed issue that could prevent saving of File Change settings, resulting
   > in an error messages of “A validation function for file-change received data
   > that did not have the required entry for latest_changes.”
 *  [mikrom](https://wordpress.org/support/users/mikrom/)
 * (@mikrom)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8300308)
 * great! I just had this error when I try exclude w3tc cache from file changes

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

The topic ‘Validation Function Error’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [mikrom](https://wordpress.org/support/users/mikrom/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/validation-function-error/#post-8300308)
 * Status: not resolved