[ic] Strip spaces from email

Jon prtyof5 at attglobal.net
Wed Apr 14 21:33:11 EDT 2004

> Quoting Ethan E. Rowe (ethan at the-rowes.com):
> > Susan Misnick wrote:
> >
> > >Hi, I'd like to strip leading or trailing spaces from the email field,
> > >which seems very straightforward, but I can't figure out where to put
> > >the code.  Hints?
> > >Thanks,
> > >Susan
> >
> > It depends on what action is being performed; if this is in relation to
> > posting an order to the database, one thing would be to put it in
> > /etc/log_transaction.  However, if you want to do something in a less
> > sensitive area, you could put a little [perl]...[/perl] block in the
> > form profile with a regular expression to trim the leading spaces.  I'm
> > still on the steep part of the Interchange learning curve myself,
> > however, so it's highly possible somebody could offer you a more elegant
> > solution.
> It's as easy as:
>         [value name=email filter=strip]

   Ya, ya... so IC is pretty amazing.. we know that.  But in the interest of
IC knowledge tell me something.. I can easily search icdevgroup.org and see
the value tag
and all the information there which includes the 'filter' parameter. But how
would one
know that strip is a valid value for filter ? Of course it just so happens
that there is a
filter tag and in reading that information there is some verbiage about the
strip parameter
and it is what would one imagine; a couple of regexp.  But in the general
sense of IC how
would someone know that strip is a valid value for the filter attribute of the
value tag ?
Just use above normal common sense and logic of what would seem reasonable to
be there ?
Or is it time for someone to write a good reference book for all us weekenders
to use ?


More information about the interchange-users mailing list