[web2py] Re: Custom validators error messages

2012-06-17 Thread Anthony
> > db.domains.name.requires =[IS_VALID_A(db, db.domains.name), > IS_NOT_IN_DB(db, db.domains.name)] > Your __init__ function takes two arguments (other than "self", which is the object itself and doesn't get passed explicitly), "object" and "error_message". You pass db as the "object" argume

[web2py] Re: Custom validators error messages

2012-06-17 Thread Jimmy Stewpot
Hello, I am trying to call it like so... db.domains.name.requires =[IS_VALID_A(db, db.domains.name), IS_NOT_IN_DB(db, db.domains.name)] This is the first time I've tried to write a class so it's all new to me. I "copied" an example. - Original Message - From: "Anthony" To: web2py@go

[web2py] Re: Custom validators error messages

2012-06-17 Thread Anthony
> > 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 th