error check to be sure entered value is within min and max limits