Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Allow empty form fields regex

by tcf22 (Priest)
on Mar 18, 2004 at 16:07 UTC ( #337717=note: print w/ replies, xml ) Need Help??


in reply to Allow empty form fields regex

How about this
if ((length($contents) > 0) && ($contents !~ /^[\w \.\,\=\" \/<>]+$/)) +{ $contentserror = "Error - message.";++$error; }
Also != should probably be !~.

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://337717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2016-06-24 21:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (322 votes). Check out past polls.