Registration wordpress capital letter

2

How do I prevent customers from signing up for wordpress with email with a capital letter? Any function without a plugin?

    
asked by anonymous 25.07.2018 / 14:48

2 answers

1

Hello, if you are using the default Wordpress registration form, you can use the user_registration_email filter. The same can be added in functions.php of your theme or in a plugin.

function wpes_lowercase_register_email($user_email)
{
    return strtolower($user_email);
}

add_filter('user_registration_email', 'wpes_lowercase_register_email');
    
01.11.2018 / 14:23
0

You can do this as follows:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>$(document).ready(function(){$('.email').keyup(function(){$(this).val(function(i,val){returnval.toLowerCase();});});});</script><inputtype="text" class="email">

I hope it helps!

    
10.10.2018 / 19:55