示例#1
0
 def validate(self, value):
     try:
         s = int(value)
         if s < min or s > max:
             raise SettingsException('out of bounds')
     except Exception, e:
         raise SettingsException(e.message)
示例#2
0
 def validate(self, value):
     """
     @raise SettingsException: On validation failure
     """
     try:
         if not self.arg1:
             self.validatorMethod(value)
         else:
             self.validatorMethod(value, self.arg1)
     except Exception, ex:
         raise SettingsException(str(ex))
示例#3
0
 def validate(self, value):
     """
     @raise SettingsException: On validation failure
     """
     raise SettingsException("%s : %s" % (self.errorMessage, value))