Home › Forums › General Issues › Validate Front End Form Submission – Unique Values only › Reply To: Validate Front End Form Submission – Unique Values only
I can’t see anything here that would cause it to not work.
Possibilities
candidate_email
is incorrect, double check the field name
Double check that the field key you’re validating is the key for the email field.
The value of the field submitted through ACF does not match what is stored in the DB.
Simple Test:
add_filter('acf/validate_value/key=field_5db9db5da28c0', 'acf_duplicate_candidate_application', 10, 4);
function acf_duplicate_candidate_application($valid, $value, $field, $input) {
$post_id = intval($_POST['_acf_post_id']);
$current_value = get_field($field['key'];
return $post_id.' '.$value.' '.$current_value;
}
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.