date example

The date validation is a very flexible validation type: using the format string you can specify any date format, whether you need ANSI, ISO format, a time, date or both in any order and using any kind of separator.

The live form - submit it!


(must be greater than the previous field)

(or leave it empty)

(minimum: 2000-01-01 13:00)

Data dump

Below are the dumps of some PHP variables - submit the form to see the changes!

Contents of the $_POST array:
$_POST = array (
)

Results of a $clonefish->getElementValues() call:
array (
  'fulldateiso' => '2010-07-30',
  'fulldateisogt' => '2010-07-30',
  'fulldate' => '07/30/2010',
  'fulltime' => '2010-07-30 01:16:14',
)

There are cases when the above arrays are different. This is not a bug, but a feature: clonefish was written to help with everyday form hassles (like avoiding the missing value of an unchecked checkbox or compiling the whole date string from date selector fields).

form validation for developers!

clonefish is a proven, mature form generator class that helps PHP developers to create, validate and process secure, flexible and easy-to-maintain forms
learn more
Bookmark and Share