Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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


Comment on Re: Allow empty form fields regex
Download Code

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 chanting in the Monastery: (5)
As of 2015-05-07 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (154 votes), past polls