[ad_1]
@emmamiumiu
Remove the validation from your login form.
Try to use this code snippet, which will add an error message
if it’s not an email address in the email field.
add_action( 'um_submit_form_errors_hook_login', 'um_submit_form_errors_hook_login_email', 9, 1 );
function um_submit_form_errors_hook_login_email( $submitted_data ) {
if ( isset( $submitted_data['user_email'] )) {
if ( ! is_email( $submitted_data['user_email'] )) {
UM()->form()->add_error( 'user_email', __( 'Please enter your email', 'ultimate-member' ) );
}
}
}Add the code snippet to your active theme’s functions.php file
or use the “Code Snippets” plugin.
@missveronicatv Thank you so much! it works!!
