On Wed, Oct 17, 2007 at 01:20:07PM -0500, Ian Bicking wrote: > FormEncode is overdue for a release, but before that a request: there > has been some mention that FormEncode should ship more useful form > validators. For instance, FieldsMatch is an example of something > currently shipped, but about the only example. Other examples would be > helpful. Probably also something generic to do easy whole-dict > validation would be quite helpful. > > Do people have classes or recipes they've written that are general > enough to include directly in FormEncode? If so, please contribute! > Realistic examples in the docstrings will be very helpful.
I could contribute validators for: - valid IPv4 network/address specifications (e.g. "10.0.0.0/8" or "192.168.25.1" but not "1.2.3.4/123") - valid hardware (MAC) address (e.g. "01:51:a5:92:be:08") - range of integers (strange I didn't find any ready ones) (e.g. IntRange(10,100)) I'd have to polish those. And of course the IntRange validator is trivial. I needed it anyway. While you are at it: I think the documentation about the "state" could be improved. It's thrown around like it's self-explantory but the uses had not been clear to me. That applies to the @validate docstring of Pylons as well because it's useful to pass along a state (e.g. a database/ORM object). Kindly Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
