It seems that neither of the \"maxlength\", \"min\" or \"max\" HTML attributes have the desired effect on iPhone for the following markup:
Another option with jQuery, but onkeypress event... ;)
$("input[type=number]").on('keypress',function(e) {
var $that = $(this),
maxlength = $that.attr('maxlength')
if($.isNumeric(maxlength)){
if($that.val().length == maxlength) { e.preventDefault(); return; }
$that.val($that.val().substr(0, maxlength));
};
});