def configure_rules(self, rules, parent=None):
        """
            Configure all rules recursively - bind them to current RuleSet and
            convert string references to `Field` rules.

            :param rules:
                Rule list
            :param parent:
                Parent rule (if any)
        """
        result = []

        for r in rules:
            if isinstance(r, BaseRule):
                result.append(r.configure(self, parent))
            elif isinstance(r, string_types):
                result.append(self.convert_string(r).configure(self, parent))
            else:
                raise ValueError('Dont know how to convert %s' % repr(r))

        return result
dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/form/rules.py/RuleSet.configure_rules/original