Last updated Sep 29, 2023


Fires when validating the $_POST data of a submitted form.

Used to add or remove validation errors controlling whether or not the submitted data will be saved.

Please note this is a generic action. If you are looking to validate a specific field value, please use the acf/validate_value filter instead.


  • Added in version 5.0.0


This example demonstrates how to bypass validation for an administrator, and also to require a custom input value. See the Notes section below for additional information on the functions used.


add_action('acf/validate_save_post', 'my_acf_validate_save_post');
function my_acf_validate_save_post() {

    // Remove all errors if the user is an administrator.
    if( current_user_can('manage_options') ) {

    // Require custom input value.
    if( empty($_POST[‘acf’][‘field_xxxxxx’] ) ) {
        acf_add_validation_error( 'acf[field_xxxxxx]', 'Please check this input to proceed' );


Additional functions

The following additional functions are made available during this action.

  • acf_add_validation_error()
    Adds a validation error and prevents the submitted data from being saved.

    acf_add_validation_error($input, [$message])
    • $input (string) (Required) The input used here should be an ACF field key, rather than the field name.
    • $message (string) (Optional) The error message to display.
  • acf_reset_validation_errors()
    Removes all validation errors and allows the submitted data to be saved.