'Validate the form
@param form: the FORM'

def validate(self, form):

    T = current.T
    formvars = form.vars
    if ('site_id' in formvars):
        site_id = formvars.site_id
    else:
        site_id = current.deployment_settings.get_org_default_site()
    if (not site_id):
        form.errors['site_id'] = T('No    site    specified')
    formvars.site_id = site_id
    if ('date' in formvars):
        date = formvars.date
    else:
        date = current.request.utcnow.date()
    formvars.date = date
