Support

Account

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.