validate rect before cropping