On Mon, Oct 12, 2009 at 9:59 AM, Joe Barnhart <[email protected]> wrote:
> +1 on the idea, but the name "dust" seems a little idiomatic, doesn't it?
>
> As an aside, I discovered the absolutely fastest way to remove a set of
Haven't worked with web2py for a many months now (this will be
remedied soon), but
something that I used to use was the following validator:
class STRIP(object):
"""
example:
INPUT(_type='text',_name='name',requires=STRIP())
removes leading and trailing whitespace on validation
"""
def __init__(self):
pass
def __call__(self, value):
return (str(value).strip(), None)
Worked well and being a validator is entirely optional.
--
Guido Kollerie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---