def checkParameterValuesBeforeExecuting(alg, parameters, context):
    """ Verify if we have the right parameters """
    txtRules = alg.parameterAsString(parameters, 'rules_txt', context)
    rules = alg.parameterAsString(parameters, 'rules', context)
    if txtRules and rules:
        return False, alg.tr("You need to set either inline rules or a rules file!")

    return True, None