Support

Account

Home Forums General Issues validate_value filter doesn't work Reply To: validate_value filter doesn't work

  • I am experiencing exactly the same problem reported here. My validate value filters never get called. They are in my theme functions.php file and I have used the code provided above.

    I am seeing acf/save_post work correctly btw. But acf/validate_value never does anything. Any help please? How do I debug this.

    I am running a brand new WP site (as of a week ago) on PHP 5.4

    To isolate this issue I dropped my child theme and I am using plain twentyseventeen. The only change is the top of functions.php as shown here

    <?php
    
    add_filter('acf/validate_value', 'my_acf_validate_value', 10, 4);
    
    function my_acf_validate_value( $valid, $value, $field, $input ){
    
    	return "is that working?";
    }
    
    /**
     * Twenty Seventeen functions and definitions
     *
     * @link https://developer.wordpress.org/themes/basics/theme-functions/
     *
     * @package WordPress
     * @subpackage Twenty_Seventeen
     * @since 1.0
     */