Tengo esta expresion regular que valida hasta 10 enteros un punto decimal y hasta 10 decimales,¿Como puedo implementar esta expresion regular en un textbox para que si no se cumple la validacion me marque un error o me detenga la escritura <script> $(document).ready(function () { $('#decimalEntero').on('input', function (e) { if (/^(\d{1,10})(.\d{1,10})?$/i.test(this.value)) { alert("Ok"); }else{ alert("error"); } }); }); </script> <html> <head> <title>10 Enteros + 10 decimales</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <form action="#"> <p> <input type="text" name="valor" id="decimalEntero" /><br /> </form> </body> </html> Login To add answer/comment