Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem with validation of Date

Featured Replies

  • Newbies

I have this:

$findCommand->addFindCriterion("Date of Birth","8/12/1982");

and I get this:

Error: Date value does not meet validation entry options

I am running out of ideas as to what the problem is.

Server is remotely hosted V12

Cheers

Brian

It's been a while since I've worked with the PHP API, but try a PHP date object as a parameter, also try an ISO formated date "1982-12-08".

Have you read the documentation?

  • Author
  • Newbies

It's been a while since I've worked with the PHP API, but try a PHP date object as a parameter, also try an ISO formated date "1982-12-08".

Have you read the documentation?

I'll try what you suggest. The documention (such as it is) says that mm/dd/yyyy is the format to use, and this is format that existing dates come over as.

The PHP appears correct. What is the Validation option for that field in your database set to? The error message is telling you that 8/12/1982 does not meet the criteria for a valid entry.

  • Author
  • Newbies

The PHP appears correct. What is the Validation option for that field in your database set to? The error message is telling you that 8/12/1982 does not meet the criteria for a valid entry.

No, there was no validation set on the field, we even tried adding some, but it still failed!

What happens if you add a leading zero to the month field?

$findCommand->addFindCriterion("Date of Birth","08/12/1982");

Brian

  • Author
  • Newbies

What happens if you add a leading zero to the month field?

$findCommand->addFindCriterion("Date of Birth","08/12/1982");

Brian

nope, tried that - still fails.

Something that has occurred to me. We use a server which hosted remotely, so I did not have access to the "filemaker.php" on the server itself. After quite a bit of googling I found it (I guess on the fm site). However I wonder whether I've actually got the latest?

Another "factor" is that the server I am running the web page on is Linux (ubunutu server), I had to install php-curl specifically, would there be anything else I might need? I've tried to look through the filemaker.php and associated files, and could see anything else, but I might have missed something.

<later> Strangely enough I am actually developing a "batch" php program to migrate data across, on an Win XP system. It would appear that the date search on there is working as required - from dates made up by

date("m/d/Y",strtotime($acrow["DateofBirth"]));"

I now have Jonathon Starks book who uses "n/j/Y" to suppress leading zeros on the day and month, but as discussed above, it does not make any difference.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.