def validate(self, data): check_fields = ["description", "membership_fee", "register_info"] validate_name(data["name"]) for item in data: if item in check_fields: general_validator(item, data[item]) return data
def validate(self, data): check_fields = [ "long_description", "short_description", "register_info", "cost", "equipment", "season", ] validate_name(data["name"]) for item in data: if item in check_fields: general_validator(item, data[item]) return data
def validate(self, data): validate_name(data["name"]) return data
def validate(self, data): validate_name(data["text"], "Text") return data
def validate(self, data): validate_name(data["name"]) general_validator("description", data["description"]) return data