Home › Forums › Backend Issues (wp-admin) › Validate one field against another › Reply To: Validate one field against another
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!
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.