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 perusing the Monastery: (8)
As of 2014-10-01 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls