> > 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" argument and db.domains.name (which is a Field object) as the "error_message" argument. > This is the first time I've tried to write a class so it's all new to me. > I "copied" an example. > You might want to read up a bit on classes and OOP in Python before proceeding. Also, have a look at some of the built-in validators (e.g., IS_NOT_IN_DB<http://code.google.com/p/web2py/source/browse/gluon/validators.py#518> ). Anthony