close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

preg_match() unknown...

Thread began 4/09/2010 8:21 pm by elton | Last modified 4/21/2010 1:43 pm by Jason Byrnes | 3550 views | 10 replies |

elton

preg_match() unknown...

When passing a time string "HH:MM" Example: "06:30" to WAValidateTheTime function I get the following error


Warning: preg_match() [function.preg-match]: Unknown modifier '(' in /WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 245

Warning: preg_match() [function.preg-match]: Unknown modifier '(' in /WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 245

Warning: Cannot modify header information - headers already sent by (output started at /WA_ValidationToolkit/WAVT_Scripts_PHP.php:245) in /WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 71

Failure occurs upon "submit."

This is the code created by the Form Builder 3

<input id="Contact_me_group_Earliest_Time_HH_MM" name="Contact_me_group_Earliest_Time_HH_MM" type="text" value="" class="formTextfield_Medium" tabindex="16" onblur="hideServerError('Contact_me_group_ServerError_7');" autocomplete="off">


Can someone provide a code fix? Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

please add the original php file to a zip archive and attach that to your reply so I can examine the code for the entire page to see what may be going wrong.

Sign in to reply to this post

elton

REPLY: preg_match() unknown...

Here is the file

Attached Files
WAVT_Scripts_PHP.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I'm sorry, the file I need to see is the page with the form on it.

Sign in to reply to this post

elton

preq_match() unknown

Here is the other file

Attached Files
ContactUsHere_php_Elton.zip
Sign in to reply to this post

elton

preq_match() unknown

Hi Jason...Do you have a response?

Sign in to reply to this post

Jason ByrnesWebAssist

try editing line 16 - 18:

php:
$WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Best_Time_to_Contact"])?$_POST["Contact_me_group_Best_Time_to_Contact"]:"") . "",true,"","","",false,"","","",false,5);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"d{4}/(1[0-2]|0[1-9])/([12]d|3[0-1]|0[1-9])","","",false,6);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Latest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Latest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"d{4}/(1[0-2]|0[1-9])/([12]d|3[0-1]|0[1-9])","","",false,7);




to:

php:
$WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Best_Time_to_Contact"])?$_POST["Contact_me_group_Best_Time_to_Contact"]:"") . "",true,".*","","",false,".*","","",false,5);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"\b(1\d|2[0-3]|0?\d):[0-5]\d\b","","",false,6);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Latest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Latest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"\b(1\d|2[0-3]|0?\d):[0-5]\d\b","","",false,7);
Sign in to reply to this post

elton

preg_match() unknown

Originally Said By: Jason Byrnes
  try editing line 16 - 18:
php:
$WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Best_Time_to_Contact"])?$_POST["Contact_me_group_Best_Time_to_Contact"]:"") . "",true,"","","",false,"","","",false,5);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"d{4}/(1[0-2]|0[1-9])/([12]d|3[0-1]|0[1-9])","","",false,6);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Latest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Latest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"d{4}/(1[0-2]|0[1-9])/([12]d|3[0-1]|0[1-9])","","",false,7);



to:
php:
$WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Best_Time_to_Contact"])?$_POST["Contact_me_group_Best_Time_to_Contact"]:"") . "",true,".*","","",false,".*","","",false,5);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Earliest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"\b(1\d|2[0-3]|0?\d):[0-5]\d\b","","",false,6);
  $WAFV_Errors .= WAValidateDT((isset($_POST["Contact_me_group_Latest_time_to_Call_HH_MM"])?$_POST["Contact_me_group_Latest_time_to_Call_HH_MM"]:"") . "",false,".*","","",true,"\b(1\d|2[0-3]|0?\d):[0-5]\d\b","","",false,7);
  



Still broken

FYI:
vars detail.
"PHPSESSID=c3c38295b5fccf3a64d94292423819b4; DBGSESSID=402848204004600003%2540localhost%253Bd%253D1%252Cp%253D0%252Cc%253D1"

Sign in to reply to this post

Jason ByrnesWebAssist

that is a javascript error. I will need to see the problem in a browser to be able to troubleshoot the cause.

Please send a link to your page where I can troubleshoot the problem.

Sign in to reply to this post

elton

Originally Said By: elton
  Hi Jason...Do you have a response?

Dear elton,

Jason Byrnes has just replied to a thread you have subscribed to entitled - preg_match() unknown... - in the Validation Toolkit forum of WebAssist Technical Support Forums.

This thread is located at:
http://www.webassist.com/forums/showthread.php?t=12036&goto=newpost

Here is the message that has just been posted:
***************
that is a javascript error. I will need to see the problem in a browser to be able to troubleshoot the cause.

[FONT=Consolas][SIZE=3]Please send a link to your page where I can troubleshoot the problem.  

[/SIZE][/FONT]

:mad:
ContactUsHere.php

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...