How do I make all of the characters of a text box lowercase as the user types them into a text field in Javascript?
This is a mask for the type of validation that you want
(function($) {
$.fn.maskSimpleName = function() {
$(this).css('text-transform', 'lowercase').bind('blur change', function(){
this.value = this.value.toLowerCase();
});
}
})(jQuery);
The advantage of using it is that the cursor will not go to the end of the input each character entered, as it would if using the a keyup or keupress solution.
$('#myinput').maskSimpleName();
This is a way to use it.
Obs: This mask sends the data in lowercase to the server as well.