code from Jquery cookbook help- number input validation

code from Jquery cookbook help- number input validation

I used this code from the jquery cookbook.  It works too well in a sense.  It does not accept any invalid input.  However, I would like to give some feedback- a text message next to the box when they enter invalid code.  I wanted to .after a span text warning but can't seem to find a good place to include in this code.  Any help would be appreciated.

      $('.onlyNumbers').bind('keydown', function(event){
            // keyCode for the key pressed
            var keyCode = event.which;

            // 48-57 standard keyboard numbers
            var isStandard = (keyCode > 47 && keyCode < 58);

            //96 - 105 extended keyboard numbers aka keypad
            var isExended = (keyCode > 95 && keyCode < 106)

            // 8 backspace  46 forward delete
            // 37 left arrow, 38 up arrow 39 right arrow 40 down arrow
            var validKeyCodes = ' ,8,37,38,39,40,46, ';
            var isOther = ( validKeyCodes.indexOf(',' + keyCode + ',') > -1);

            if ( isStandard || isExended || isOther) {
                return true;
            } else {
                return false;
            }
        }).bind('blur', function(){
            // regular expression that matches everything not a number
            var pattern = new RegExp('[^0-9] +', 'g');

            var $input = $(this);
            var value = $input.val();

            // clean the value using reg exp
            value = value.replace(pattern, ' ');
            $input.val(value)

        });