close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

server validation

Thread began 5/06/2019 12:23 pm by Jamie | Last modified 5/08/2019 9:43 am by Ray Borduin | 557 views | 7 replies |

Jamie

server validation

Hey Ray

Trying to use a date validation

$WAFV_Errors .= WAValidateDT(((isset($_POST["DOB"]))?$_POST["DOB"]:"") . "",true,"\b([12]\d|3[0-1]|0[1-9])\/(1[0-2]|0[1-9])\/\d{4}\b","","",false,".*","","",true,5);



But when I use the right format it still fails as you can see here:http://prntscr.com/nl8cla

What might I have done wrong to make it keep failing?

Sign in to reply to this post

Ray BorduinWebAssist

PHP is expecting a US date, so 05/16/1969, not 16/05/1969.

PHP assumes dates with slashes are in US format and dates with dashes are EU format. The easiest solution is to use the format: 16-05-1969

Another solution is to make that change in the validation code before it is validated like:

$WAFV_Errors .= WAValidateDT(((isset($_POST["DOB"]))?str_replace("/","-",$_POST["DOB"]):"") . "",true,"\b([12]\d|3[0-1]|0[1-9])-(1[0-2]|0[1-9])-\d{4}\b","","",false,".*","","",true,5);
Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

Ok, thanks Ray will use your solution but FYI in the server validation date selection, it clearly shows a UK style date dd/mm/yyyy (http://prntscr.com/nllx02) as an option


EDIT. Have tried your solution but it still wont pass validation...

Sign in to reply to this post

Ray BorduinWebAssist

I forgot to update the pattern in the update... Please try again. I've edited the code in my previous post.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thank you .... I've been trying to get it to work with 2 digit year format and have tried to modify it to this (based on other selections in the validation selection):

\b([12]\d|3[0-1]|0[1-9])-(1[0-2]|0[1-9])-\d{2,4}\b



but that doesnt work

Sign in to reply to this post

Ray BorduinWebAssist

I just uploaded an update to data bridge. It has a new version of the wavt_script_php.php file that should correct these issues.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

have just installed the update, run the validation wizard and uploaded wavt_script_php.php but no joy.

The version of wavt_script_php.php that I have is 2.01 - not sure if thats the recent one?

Sign in to reply to this post

Ray BorduinWebAssist

It should be version 2.02. I'll send it to you.

Sign in to reply to this post
Did this help? Tips are appreciated...

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...