Example #1
0
 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
Example #2
0
 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
Example #3
0
 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
Example #4
0
 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