[ic] multizip check fails with trailing space

Stefan Hornburg (Racke) racke at linuxia.de
Wed Aug 4 08:08:23 UTC 2010


On 07/23/2010 10:03 PM, Josh Lavin wrote:
> Is there any reason why Order.pm allows leading spaces, but not trailing
> spaces, in the US zip_routine for the multizip profile check?
>
> It has been this way for many years, so it is hard to believe that it
> was not intentional...
>
> If it's an oversight, then it's a simple fix:
>
> -$zip_routine{US} = sub { $_[0] =~ /^\s*\d\d\d\d\d(?:-?\d\d\d\d)?$/ };
> +$zip_routine{US} = sub { $_[0] =~ /^\s*\d\d\d\d\d(?:-?\d\d\d\d)?\s*$/ };
>

I would prefer to generally filter out leading/trailing whitespace from
user's input, especially on email adresses, passwords etc.

There is no point in keeping it in most cases, and it leads to hard to
find problems and certainly confuses the user.

Regards
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list