Well, I tried one more thing literally a few seconds after posting my previous thread and managed to figure it out 🙂
Hope the following helps someone; the trick seems to be $_POST['post_id']
.
function my_validate_value( $valid, $value, $field, $input ) {
$post_id = $_POST['post_id'];
if($value !== 'my-condition'){
$valid = 'Nope: ' . $post_id;
};
return $valid;
}
add_filter('acf/validate_value/key=field_5928960704f6f', 'my_validate_value', 10, 4);