fixed validation on min max