Adds max and min dimension validation