def validate_weight(self, value):
        if value:
            validator.IntValidator(value).to_int()
        return value
Integer or empty
dataset/ETHPy150Open Net-ng/kansha/kansha/card_addons/weight/comp.py/CardWeightEditor.validate_weight