Jump to content

joe_john

New Members
  • Posts

    6
  • Joined

  • Last visited

joe_john's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is kind of related to the question from yesterday, on how to block urls in the phone number field I was given this code: /^([\d\.()\:\- ]+)(ext(ension)?:\s+\d+)?$/i which is good, but it's not liberal enough. I looked at past submissions, and people are entering some weird things. for example, instead of extension, they entered @ext which would get rejected if I implement the above code. my goal is to be as liberal as possible, so I think instead of allowing certain characters and disallowing everything else, I should allow everything and disallow just certain characters I want to block http // www .com .net .info .org if someone puts any of these strings in the phone number field and presses submit, the form should not get submitted. Can I do this?
  2. you are awesome, thanks so much.
  3. Hi ok, just did some testing. seems ok, but not quite. for example, this fails: (323) 894-94.39 ext 55 not sure why.
  4. Hi I really appreciate that you downloaded the script and studied it. People can be very unpredictable when entering their phone numbers. I want to make sure all possibilities are covered. So this regex code that you gave me will allow numbers letters - dot ( ) : space Is that right? Edit2: sorry to bother you, but when I tried the code, no matter if the phone number is valid or not, it says Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in public_html/xxxxx.com/contact-files/contact-form-process.php on line 368
  5. Edit2: if banning http cannot be implemented, how about ONLY allowing letters numbers - : dots right paranthesis left paranthesis no forward slashes so this would go through: (345) - 889- 9944 extension: 882 this would go through: 345.889.9944 but this would not go through: http://www.
  6. hi I have an html/css based website. For my contact form, I am using a script called "fast secure contact form" The contact form looks like this: name: email: phone number: message: every day, I am receiving more than 20 spam messages in my inbox through the contact form. I don't want to enable captcha because it's a turn-off for my site's visitors. In the options section of this script, for each field, there is something called "validation regex" where you can enter anything you want. I don't know what it means or how it works, but I understand you can ban a string of characters using validation regex. Looking at the spam messages, the one thing they have in common is that in the phone number field, they put a URL. so their might put http://www.whatever.com Using validation regex, how can I ban the string http? so if the phone number field contains the this exact sequence of letters h followed by t followed by t followed by p, then form does not get submitted? Edit: just as a side note, another thing I could do is to allow numbers only, but some people put the word "extension" or "ext" in the phone number field, so that won't work.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.