'Check we have either a URL or a file'

@staticmethod
def gis_layer_file_onvalidation(form):

    form_vars = form.vars
    doc = form_vars.file
    if (doc is None):
        return
    if ((not hasattr(doc, 'file')) and (not doc) and (not form_vars.url)):
        msg = current.T('Either    file    upload    or    URL    required.')
        form.errors.file = msg
        form.errors.url = msg
