Пример #1
0
 def __init__(self, type_name, encoder, new_format):
     """
     @param new_format: Required formatting of date in string form, according 
            to Python's U{datetime.strptime<http://docs.python.org/library/datetime.html>}.
     """
     self.format = None
     
     BaseValidationRule.__init__(self, type_name, encoder)
     self.set_date_format(new_format)
    def __init__(self, type_name, encoder, new_format):
        """
        @param new_format: Required formatting of date in string form, according 
               to Python's U{datetime.strptime<http://docs.python.org/library/datetime.html>}.
        """
        self.format = None

        BaseValidationRule.__init__(self, type_name, encoder)
        self.set_date_format(new_format)
 def __init__(self, type_name, encoder=None, whitelist_pattern=None):
     self.whitelist_patterns = []
     self.blacklist_patterns = []
     self.min_length = 0
     self.max_length = MAX_INTEGER
     
     BaseValidationRule.__init__(self, type_name, encoder)
     
     if whitelist_pattern:
         self.add_whitelist_pattern(whitelist_pattern)
    def __init__(self, type_name, encoder=None, whitelist_pattern=None):
        self.whitelist_patterns = []
        self.blacklist_patterns = []
        self.min_length = 0
        self.max_length = MAX_INTEGER

        BaseValidationRule.__init__(self, type_name, encoder)

        if whitelist_pattern:
            self.add_whitelist_pattern(whitelist_pattern)
Пример #5
0
 def __init__(self, type_name, encoder):
     BaseValidationRule.__init__(self, type_name, encoder)
     self.ccrule = self.get_cc_rule(encoder)
 def __init__(self, type_name, num_type, encoder, min_value, max_value):
     BaseValidationRule.__init__(self, type_name, encoder)
     
     self.num_type = num_type
     self.min_value = min_value
     self.max_value = max_value
 def __init__(self, type_name, encoder):
     BaseValidationRule.__init__(self, type_name, encoder)
     self.ccrule = self.get_cc_rule(encoder)
    def __init__(self, type_name, num_type, encoder, min_value, max_value):
        BaseValidationRule.__init__(self, type_name, encoder)

        self.num_type = num_type
        self.min_value = min_value
        self.max_value = max_value