Exemplo n.º 1
0
 def validate(self, clean=True):
     Utility.validate_document_list(self.events)
     if Utility.check_empty_string(self.block_name):
         raise ValidationError(
             "Story path name cannot be empty or blank spaces")
     elif not self.events:
         raise ValidationError("Stories cannot be empty")
Exemplo n.º 2
0
 def validate(self, clean=True):
     Utility.validate_document_list(self.events)
     if Utility.check_empty_string(self.block_name):
         raise ValidationError(
             "Story path name cannot be empty or blank spaces")
     elif not self.events:
         raise ValidationError("Stories cannot be empty")
     elif self.events[0].type != "user":
         raise ValidationError("Stories must start with intent")
     elif self.events[-1].type != "action":
         raise ValidationError("Stories must end with action")
Exemplo n.º 3
0
 def validate(self, clean=True):
     if Utility.check_empty_string(self.text):
         raise ValidationError(
             "Response text cannot be empty or blank spaces")
     Utility.validate_document_list(self.buttons)