'Custom Form Validation:
used for import from CSV'

@staticmethod
def cap_info_onvalidation(form):

    form_record = form.record
    if (form_record and (form_record.is_template == False)):
        form_vars = form.vars
        if (not form_vars.get('urgency')):
            form.errors['urgency'] = current.T("'Urgency'    field    is    mandatory")
        if (not form_vars.get('severity')):
            form.errors['severity'] = current.T("'Severity'    field    is    mandatory")
        if (not form_vars.get('certainty')):
            form.errors['certainty'] = current.T("'Certainty'    field    is    mandatory")
        if (not form_vars.get('category')):
            form.errors['category'] = current.T('At    least    one    category    is    required.')
