Home › Forums › General Issues › add_filter “acf/validate_save_post” and acf_add_validation_error › Reply To: add_filter “acf/validate_save_post” and acf_add_validation_error
You can compare fields the same way, buy looking at the values in $_POST[‘acf’] to look at other values.
I am assuming by looking at these that the fields are sub fields of a group field
$email = $_POST['acf']['field_65067bd15086d']['field_65067bde5086e'];
$confirmEmail = $_POST['acf']['field_65067bd15086d']['field_65067e4f26db1'];
You can do the same thing or you can depend on the $value passed by ACF and compare it to the other 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.