Support

Account

Home Forums Front-end Issues Frontend Custom Validation for acf_form Reply To: Frontend Custom Validation for acf_form

  • I just did a test and everything is working as expected using this code

    
    add_filter('acf/validate_value/key=field_64ba92e423e65', 'validate_email_field', 20, 4);
    function validate_email_field( $valid, $value, $field, $input ) {
      if (!$valid) {
        return $valid;
      }
      if( email_exists( $value ) ) {
        $valid = 'email exists';
      }
       return $valid;
    }
    

    You must have something else that is interfering, as I said in my original response, something that is breaking the ajax response. Either another plugin or some code in the theme.