Support

Account

Home Forums General Issues Validate Front End Form Submission – Unique Values only Reply To: Validate Front End Form Submission – Unique Values only

  • I can’t see anything here that would cause it to not work.

    Possibilities

    candidate_email is incorrect, double check the field name

    Double check that the field key you’re validating is the key for the email field.

    The value of the field submitted through ACF does not match what is stored in the DB.

    Simple Test:

    
    add_filter('acf/validate_value/key=field_5db9db5da28c0', 'acf_duplicate_candidate_application', 10, 4);
    
    function acf_duplicate_candidate_application($valid, $value, $field, $input) {
      $post_id = intval($_POST['_acf_post_id']);
      $current_value = get_field($field['key'];
      return $post_id.' '.$value.' '.$current_value;
    }