示例#1
0
文件: forms.py 项目: areski/cdr-stats
 def clean_destination_no(self):
     """
     Form Validation :  destination_no Check
     """
     destination_no = self.cleaned_data['destination_no']
     if not isint(destination_no):
         raise forms.ValidationError("enter digit only!")
     return destination_no
示例#2
0
文件: forms.py 项目: rewvad/test-cdr
 def clean_destination_no(self):
     """
     Form Validation :  destination_no Check
     """
     destination_no = self.cleaned_data['destination_no']
     if not isint(destination_no):
         raise forms.ValidationError("enter digit only!")
     return destination_no
示例#3
0
文件: forms.py 项目: areski/cdr-stats
 def clean_profit_percentage(self):
     """
     Validation Check:
     Percentage Value must be in digit (int/float)
     """
     chk = self.cleaned_data["chk"]
     p_p = self.cleaned_data["profit_percentage"]
     if chk:
         if not isint(p_p):
             raise forms.ValidationError(_("please enter int/float value"))
         else:
             return p_p
示例#4
0
文件: forms.py 项目: rewvad/test-cdr
 def clean_profit_percentage(self):
     """
     Validation Check:
     Percentage Value must be in digit (int/float)
     """
     chk = self.cleaned_data["chk"]
     p_p = self.cleaned_data["profit_percentage"]
     if chk:
         if not isint(p_p):
             raise forms.ValidationError(_("please enter int/float value"))
         else:
             return p_p