I would like to validate one field against another. Both fields are ACF fields.
How do I get the value of the other field inside the acf/validate_value.. filter, since I don’t have the post id in order to retrieve the field using get_field, and without the second parameter get_field doesn’t appear to work.
Thanks for any help. I’m probably doing something really stupid
Not realy.. I need to compare value if it exists in othere posts and if does then fail the validation, but since we don’t have $post_id i can’t exclude current post to check how many posts there are with meta_value. And if i don’t exclude curent id then when i do validation on new post it doesn’t have a meta_value set and get_posts finds only 1 post and validation is ok, so after validate_value i have 2 pots with same meta_value
So if someone knows how can we get post_id in validate_value please tell us!