Esempio n. 1
0
 def validate_order_type(self, value):
     try:
         self.order_type.data = PayTypeEnum.from_name(value.data)
     except Exception as e:
         raise StopValidation("无效的 order_id")
Esempio n. 2
0
 def validate_payment_way(self, value):
     try:
         self.payment_way.data = PayTypeEnum.from_name(value.data)
     except Exception as e:
         raise StopValidation("无效的 payment_way")