Q:

Regex to go beyond 10 numbers

Trying to match with regex, it has to be a number and it shouldn't go beyond 10 numbers. Anything else don't show!
match(/[^0-9]|[0-9]{10,80}/)

The first part works, meaning it's NOT a number, but the second part doesn't, if it's above 10.
http://jsfiddle.net/qwtmnuey/1/
I can do it in another way but I want it the regex way.. thank you!
(function($){
    $('input').on( 'keypress', function(e){
    var char = String.fromCharCode(e.keyCode);
        if ( char.match(/[^0-9]|[0-9]{10,80}/) ) {
            e.preventDefault();
        }
    });
})(jQuery)

HTML: 
<input type="text">

A:

You're checking if char matches the regex, but you mean to check if the entire contents of the input match your regex. If you add id="myinput" to your <input> and in your javascript you add
var inputdata = document.getElementById("myinput").value;

Then you can check if inputdata matches your regex it does work.
Also you're checking for {10,80} which means between 10 and 80 but you can also change that to {10,} which means 10 or more

