min max validator class