Home › Forums › Front-end Issues › Check for duplicate post based on custom date field › Reply To: Check for duplicate post based on custom date field

from what I can see it is because you are validating $value against this $$date_key.$coach_object and this is created by doing this.
$start_time = $_POST['acf']['field_58c2cb3c85ad0'];
$date_key = strtotime($start_time);
$coack_key = 'coach';
$coach_object = $_POST['acf']['field_59066c838afa6']; // this works
You must do the same thing in your validation filter and then query against this value and not $value which is passed to your filter by ACF.
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.