'Custom Form Validation'

@staticmethod
def cap_info_parameter_onvalidation(form):

    form_vars = form.vars
    parameter_name = form_vars.get('name')
    parameter_value = form_vars.get('value')
    if ((parameter_name and (not parameter_value)) or (parameter_value and (not parameter_name))):
        form.errors['name'] = current.T('Name-Value    Pair    is    incomplete.')
