fixes min restriction

Range restriction must have a max and min value, while length can be
one or the other.