Home › Forums › ACF PRO › Is it possible to apply validation to draft post? › Reply To: Is it possible to apply validation to draft post?
Hi @james
As a temporaly solution,
I modified 2 files of ACF core like below.
Do you think this modification will cause system malfunction?
/advanced-custom-fields-pro/assets/js/acf-input.min.js
- 'click #save-post':'click_ignore',
+ 'click #save-post':'click_publish',
/advanced-custom-fields-pro/forms/post.php
- if( get_post_status($post_id) == 'publish' ) {
+ if( in_array(get_post_status($post_id), array('publish', 'future', 'draft', 'pending', 'private')) ) {
PS
Validation for posts beside publish is indispensable for 70% of my cliant cases.
I wish coming ACF PRO will be able to select statuses to be validated.
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.