David – I figured out a workaround while using the
validate_value filter, which is what is called on each field by
validate_save_post so it should work there as well.
I wrote up how to make the post_ID available in validate_value on my site. Inserting a
acf[post_ID] value should work for you too, or if you want to give it a shot I finished up a beta version of my Validated Field plugin which gives you a UI to write validation rules as well as check for unique values, set input masks, etc. I just finished it a couple days ago as it required a major update for ACF 5.0, but it is working pretty well although I have already found a few small issues I plan to address shortly.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.