def validates_param_id(obj, rule_id):
    checker = Checker()
    check = True

    _ = obj._
    checker.errors = []

    check = checker.check_number(
            _('Firewall Rule ID'),
            rule_id,
            CHECK_EMPTY | CHECK_VALID | CHECK_MIN | CHECK_MAX,
            min = ID_MIN_LENGTH,
            max = ID_MAX_LENGTH,
        ) and check

    obj.view.alert = checker.errors

    return check
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/hostby1firewallruleby1.py/validates_param_id/original