Filter: um_email_validation_error_message

apply_filters( 'um_email_validation_error_message', $secure_message, $real_message, $code, $key, $attributes, $mode ) → {string}

Filters the public email validation error message.

The specific reason is available only to server-side callbacks. Returning it may disclose whether an email address belongs to an existing account.

Parameters:
Name Type Description
$secure_message string

Generic public error message.

$real_message string

Specific, translated error message.

$code string

Stable error identifier.

$key string

Field meta key.

$attributes array

Field attributes.

$mode string

Form mode.

Since:
  • 2.14.0
Source:
Returns:

Public error message.

Type
string
Example

Change the error message for an email address that is already in use.

function my_email_validation_error_message( $secure_message, $real_message, $code, $key, $attributes, $mode ) {
    if ( 'email_exists' === $code ) {
        return $real_message;
    }
    return $secure_message;
}
add_filter( 'um_email_validation_error_message', 'my_email_validation_error_message', 10, 6 );