Empty input validation

$("input[type=text], textarea").change(function(){ este = this.value if($.trim(este).length === 0){ alert("No se permiten espacios en blanco") this.focus() this.value = "" } });
A little validation to keep empty spaces being posted in forms.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.