Has anyone used formlib validators?  What is the proper technique? I do not seem to be having any success.  Here is a validator that I wrote that seems to do nothing (the success method is not called, and the form is redisplayed without errors).  Basically it looks like the validator is being executed, but that it is not returning the proper format for errors.  What is the proper way to generate a validation error? 


    def checkFields(self,action,data):


        errs = self.validate(None,data)

        if len(errs) > 0 :

            return errs

        errs = []

        if self.context.isRegistered(self.login):

            print "Login in use"

            err = WidgetInputError('login',u'Login',LoginInUse())


        return errs





David Johnson


201 Main Street Suite 1320

Fort Worth, TX 76102

(877) 572-8324 x2200


Zope3-users mailing list

Reply via email to