On Dec 31, 2010, at 9:44 AM, DenesL wrote:
> 
> On Dec 31, 12:23 pm, Jonathan Lundell <[email protected]> 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.
>> 
> 
> Those messages are set by IF statements inside the validator where
> they are not accessible to the developer, and they should be
> translatable. How would you define error_message to handle the four
> different cases?.

You don't need to. For any given instantiation, only one of the error messages 
is relevant (it's a static function of min & max).

> 
>> 
>> 
>>> An easy solution would be to wrap them in a T call but that results
>>> in:
>>> NameError: global name 'T' is not defined, line 188, in restricted
>> 
>>> So the question is why T can not be part of the environment variable
>>> when it is available at the model level.
>> 
>> Perhaps because validators.py gets compiled without T being defined? I'm a 
>> little fuzzy on the whole subject, and would appreciate some clarification.
>> 
>> 
>> 


Reply via email to