>
> class IS_VALID_A(object): 
>    Name = 'IS_VALID_A' 
>    def __init__(self, object, error_message='Invalid Domain Name'):
>

Why is "object" the second argument of __init__? What is "object", and are 
you doing anything with it? Are you passing in a value for "object" when 
you instantiate the validator?
 

>       self.error_message = error_message 
>       self.d = object 
>       self.DEBUG = 'YES' 
>
>    def __call__(self, value): 
>       if self.checkrecord(value) == 'valid': 
>          return (value, None) 
>       else: 
>          return (value, (self.error_message)) 
>
>    def checkrecord(self, data): 
>       value = 'invalid' 
>       return value 
>
>
> In theory that should always error and give me a message saying 'Invalid 
> Domain Name'.
>

Yes, it should, and in fact it does as long as you pass a value for 
"object" when you instantiate. Can you show the code where you use the 
validator (i.e., where it is instantiated and then later called)?

Anthony
 

Reply via email to