Ticket #7807: oldforms-length.patch
File oldforms-length.patch, 761 bytes (added by , 16 years ago) |
---|
-
oldforms/__init__.py
old new 381 381 def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=None, member_name=None): 382 382 if validator_list is None: validator_list = [] 383 383 self.field_name = field_name 384 self.length, self.maxlength = length, maxlength 384 385 if (length > maxlength): 386 self.length, self.maxlength = maxlength, maxlength 387 else: 388 self.length, self.maxlength = length, maxlength 389 385 390 self.is_required = is_required 386 391 self.validator_list = [self.isValidLength, self.hasNoNewlines] + validator_list 387 392 if member_name != None: