'Validate case activity form:
- end date must be after start date'

@staticmethod
def case_activity_onvalidation(form):

    T = current.T
    form_vars = form.vars
    try:
        start = form_vars.start_date
        end = form_vars.end_date
    except AttributeError:
        return
    if (start and end and (end < start)):
        form.errors['end_date'] = T('End    date    must    be    after    start    date')
