I have a form that needs to have either a valid url or a valid file for uploading:
class ResourceUpload(ModelForm):
...
uploadedfile = forms.FileField('file')
url_address = forms.URLField('url')
...
How can I override the FileField
and URLField
validators so that Django only raises an error if both of the fields above are invalid but excepts one being invalid so long as the other is valid?