apply maxlength condition to number inputs