I am far from programming. Can you show an example? Thanks.
I made a temporary solution until the developers tell me what to do next. The field is now being validated in the Draft. If the value is already in the database, then after saving to the draft, the field is erased.
// validate for published post (allow draft to save without validation)
if ( $post->post_status == 'draft' ) {
// bail early if validation fails
if ( ! acf_validate_save_post() ) {
return;
}
}
Edit file and the code above on 321 lines
/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-post.php
Does the pre save post help?
I don’t understand, I’m not really good at programming.
https://support.advancedcustomfields.com/forums/topic/accept-only-unique-values/#post-45359
This solution checks the field when I click Publish Entry. And I need the field to be checked immediately after I entered the value. Before I publish the post.