set min-max of input