Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 rifling through the Monastery: (6)
As of 2015-01-26 23:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (197 votes), past polls