code: def clean(self):
          
          data = self.cleaned_data
          photo = data['photo']
          if (
              (data['crop_left'] > photo.width) or
              (data['crop_top'] > photo.height) or
              ((data['crop_left'] + data['crop_width']) > photo.width) or
              ((data['crop_top'] + data['crop_height']) > photo.height)
          ):
              # raise forms.ValidationError, ugettext("The specified crop coordinates do not fit into the source photo.")
              raise ValidationError(ugettext("The specified crop coordinates do not fit into the source photo."))
          return data
docs: Validation function that checks the dimensions of the crop whether it fits into the original and the format.