Hola
 
A ver si te ayuda esto   
Código Javascript
:
Ver original- <html> 
- <head> 
- <script type="text/javascript"> 
- function envio_form(val){ 
- var bol = function() {return compruebo_existencia_registro()}(); 
- if (bol === true) { 
- alert("enviar") 
- } else { 
- alert("no enviar") 
- return false; 
- } 
- } 
-   
-   
- function compruebo_existencia_registro(){ 
-      
-     //el blabla correspondiente 
-     if(document.getElementById('Usuario').value=='Adler'){ 
-         return false; 
-     }else{ 
-         return true; 
-     } 
- } 
- </script> 
- </head> 
- <body> 
- <form action="" method="get" onsubmit="return envio_form(this);"> 
- <input type="text" name="Usuario" id="Usuario" value="Adler" /> 
- <input type="submit" value="Validar" /> 
- </form> 
- </body> 
- </html> 
Suerte