Example #1
0
 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
Example #2
0
 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
Example #4
0
 def validate(self, data):
     validate_name(data["text"], "Text")
     return data
Example #5
0
 def validate(self, data):
     validate_name(data["name"])
     general_validator("description", data["description"])
     return data