job_bm_company_edit_errors

add_action('job_bm_company_edit_form', 'job_bm_company_edit_form_19082019');

function job_bm_company_edit_form_19082019(){

    ?>
    <div class="form-field-wrap">
        <div class="field-title"><?php echo __('Custom input field','job-board-manager-company-profile'); ?></div>
        <div class="field-input">
            <input placeholder="" type="text" value="" name="custom_input">
            <p class="field-details"><?php echo __('Custom input details.','job-board-manager-company-profile'); ?>
            </p>
        </div>
    </div>
    <?php

}

 

add_filter('job_bm_company_edit_errors','job_bm_company_edit_errors_19082019', 90,2);

function job_bm_company_edit_errors_19082019( $error, $post_data){

    if(empty($post_data['custom_input'])){

        $error->add( 'custom_input', __( 'ERROR: Custom input is empty.', 'job-board-manager-company-profile' ) );
    }

    return $error;

}

View post on imgur.com