WordPress at a glance
filter is not described

customize_validate_(id) filter-hook . WP 4.6.0

Validates a Customize setting value.

Plugins should amend the $validity object via its WP_Error::add() method.

The dynamic portion of the hook name, $this->ID, refers to the setting ID.


add_filter( 'customize_validate_(id)', 'filter_function_name_2484', 10, 3 );
function filter_function_name_2484( $validity, $value, $setting ){
	// filter...

	return $validity;
Filtered from true to WP_Error when invalid.
Value of the setting.
WP_Customize_Setting instance.


Since 4.6.0 Introduced.

Where the hook is called

wp-includes/class-wp-customize-setting.php 611
$validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this );

Where in WP core the hook is used WordPress

wp-includes/class-wp-customize-setting.php 199
add_filter( "customize_validate_{$this->id}", $this->validate_callback, 10, 3 );