set min and max for number fields