On Dec 31, 2010, at 9:23 AM, Jonathan Lundell wrote:
>
> On Dec 31, 2010, at 8:54 AM, DenesL wrote:
>>
>>
>> The problem is that those messages are defined internally in the
>> validator and can not be set via error_message.
>
> Actually, they can, except that there's a bug for the first one, 'enter an
> integer' that needs to be fixed.
Here's a patch for the bug:
self.minimum = self.maximum = None
if minimum is None:
if maximum is None:
- if error_message is None:
- self.error_message = 'enter an integer'
+ self.error_message = error_message or 'enter an integer'
else:
self.maximum = int(maximum)
if error_message is None: