add min and max to input