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):

        self.getFormFields()

        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())

            errs.append(err)

        return errs

 

 

 

--

David Johnson

[EMAIL PROTECTED]

201 Main Street Suite 1320

Fort Worth, TX 76102

(877) 572-8324 x2200

 

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to