Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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