On 1/18/06, Randall <[EMAIL PROTECTED]> wrote:
>
> > I believe you can say validators=<someschema> and the schema gets all
> > of the values, not just a single value.
>
> I tried this, but could not get it to work.  No validation and no
> errors.  I'm working with revision 527.
>
> class FormSchema(formencode.Schema):
>     title = validators.PlainText(not_empty=True)
>     notes = validators.PlainText(not_empty=True)
>     reviewer = validators.Int(not_empty=True)
>
> @turbogears.expose(inputform=search_form, validators=FormSchema)

That sounds like a bug. Maybe there's some interplay when you have
both validators and an inputform listed. Can you file a ticket
(milestone 0.9)?

>
> Aside from this instance, I've been testing with form widgets and
> validation.  What I think is missing is for a form widget to accept a
> Formencode Schema.  I think this would be the most straight forward way
> to construct a form widget with validation.

That's a good suggestion and should be trivial to do. Can you open
another ticket on that?

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to