Filter: um_admin_builder_skip_field_validation

apply_filters( 'um_admin_builder_skip_field_validation', $skip, $post_input, $submission_data ) → {bool}

Filters the marker for skipping field validation.

Parameters:
Name Type Description
$skip bool

Errors list. It's null by default.

$post_input string

Field key for validation.

$submission_data array

Update field handler data.

Since:
  • 2.1.0
Source:
Returns:

True for skipping validation.

Type
bool
Example

Skipping validation for the `_options` setting field for `billing_country` and `shipping_country` form fields.

function my_custom_um_admin_builder_skip_field_validation( $skip, $post_input, $submission_data ) {
    if ( $post_input === '_options' && isset( $submission_data['post']['_metakey'] ) && in_array( $submission_data['post']['_metakey'], array( 'billing_country', 'shipping_country' ), true ) ) {
        $skip = true;
    }
    return $skip;
}
add_filter( 'um_admin_builder_skip_field_validation', 'my_custom_um_admin_builder_skip_field_validation', 10, 3 );