Home › Forums › Front-end Issues › Validation of two fields › Reply To: Validation of two fields
You need to create an acf/validate_value (https://www.advancedcustomfields.com/resources/acf-validate_value/) filter. For example you can add the filter on the name field. In the filter you need to get all of the values you are validating on and then do a query to see if there is existing posts with that value. In the past I posted an example of doing this here https://support.advancedcustomfields.com/forums/topic/accept-only-unique-values/#post-45359
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.