On Oct 27, 7:16 pm, Ian Bicking <[EMAIL PROTECTED]> wrote:
> cust_schema = formencode.Schema(allow_extra_fields=True,
> filter_extra_fields=True)
> cust_schema.add_field('v1', formencode.validators.Email(not_empty=True)
> cust_schema.add_field('v2', formencode.validators.Int(not_empty=False,
> max=100)

Ah, that's exactly what I've been looking for, thanks!

> > By the way, Ian suggested that there were min and max keyword arguments
> > for the Int validator in the "FormEncode form validators" thread, but I
> > don't get them to work:
>
> >>>> val = validators.Int(max=5)
> >>>> val.to_python('10')
> > 10
>
> Somehow I thought they were there generally, but they weren't.  In the
> FormEncode trunk they work.

Cool, I find this very convenient. Looking forwards to the next
release.

Frederik


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to