Created
March 1, 2012 18:00
-
-
Save Geekfish/1951707 to your computer and use it in GitHub Desktop.
Customer form suggestion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clean(self): | |
if not self.cleaned_data['date_from'] and not self.cleaned_data['date_to']: | |
raise forms.ValidationError(_("At least one date field is required.")) | |
return super(SearchByDateRangeForm, self).clean() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment