set validmin and validmax as floats