Ticket #440: 440.1.patch
File 440.1.patch, 615 bytes (added by , 19 years ago) |
---|
-
formfields.py
222 222 self.validator_list = [self.isValidLength, self.hasNoNewlines] + validator_list 223 223 224 224 def isValidLength(self, data, form): 225 if data and self.maxlength and len(data ) > self.maxlength:225 if data and self.maxlength and len(data.decode('utf-8')) > self.maxlength: 226 226 raise validators.ValidationError, "Ensure your text is less than %s characters." % self.maxlength 227 227 228 228 def hasNoNewlines(self, data, form):