How do I prevent customers from signing up for wordpress with email with a capital letter? Any function without a plugin?
How do I prevent customers from signing up for wordpress with email with a capital letter? Any function without a plugin?
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');
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!