Home › Forums › ACF PRO › Checking if Custom Post Type already Exists › Reply To: Checking if Custom Post Type already Exists
Shameless plug – you can use my Validated Field plugin to check ACF field submissions. I am currently working on an upgrade (done with 5.x, working through the 4.x code now) but you can check it out in the WordPress repo here: https://wordpress.org/plugins/validated-field-for-acf/
The logic above would still be used as part of the PHP validation, and if there is an error you would just return "this is the error message";
otherwise you can return true;
to have it pass (or just do nothing, pass is the default).
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.