in reply to validation of posted data.
It's already been said here, but it's worth saying again:
Don't try to exclude all `illegal' or `invalid' characters. You'll never get them all. Instead, decide what you will accept, and make sure your input contains that, and nothing else.
I'd write your regexp something like this:
unless ( $display =~ /^[a-z0-9\-\.]+$/ ) { # Invalid input }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: validation of posted data.
by Cine (Friar) on Jul 31, 2002 at 22:15 UTC | |
by BorgCopyeditor (Friar) on Aug 01, 2002 at 04:27 UTC | |
by Cine (Friar) on Aug 01, 2002 at 07:17 UTC |