Commit 39e7d02f authored by Carsten  Rose's avatar Carsten Rose
Browse files

Bug #5309 / Input dateTime: 'min|max date' broken - small Manual.rst update.

parent ee250d95
......@@ -2490,10 +2490,13 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| fillStoreVar | string | Fill the STORE_VAR with custom values. See `STORE_VARS`_. |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| min | string | Minimum and/or maximum allowed values for input field. Can be used for numbers, dates, or strings. |
| max | string | |
| min | s/d/n | Minimum and/or maximum allowed values for input field. Can be used for numbers, dates, or strings. |
+------------------------+--------+ |
| max | s/d/n | *Always use the international format 'yyyy-mm-dd[ hh:mm[:ss]]* |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
* `s/d/n`: string or date or number.
Effect matrix
^^^^^^^^^^^^^
......
......@@ -96,9 +96,13 @@ class SanitizeTest extends \PHPUnit_Framework_TestCase {
$val = 56;
$this->assertEquals('', Sanitize::checkMinMax($val, [ FE_MIN => "0", FE_MAX => "2" ]), $msg);
$this->assertEquals($val, Sanitize::checkMinMax($val, [ FE_MIN => "0" ]), $msg);
$this->assertEquals($val, Sanitize::checkMinMax($val, [FE_MAX => "56"]), $msg);
$this->assertEquals('', Sanitize::checkMinMax($val, [FE_MIN => "57"]), $msg);
$this->assertEquals('', Sanitize::checkMinMax($val, [ FE_MAX => "2" ]), $msg);
$this->assertEquals($val, Sanitize::checkMinMax($val, [ FE_MIN => "0", FE_MAX => "200" ]), $msg);
$this->assertEquals($val, Sanitize::checkMinMax($val, [ FE_MIN => "-100", FE_MAX => "200" ]), $msg);
$val = -56;
$this->assertEquals('', Sanitize::checkMinMax($val, [ FE_MIN => "0", FE_MAX => "2" ]), $msg);
$this->assertEquals('', Sanitize::checkMinMax($val, [ FE_MIN => "0", FE_MAX => "200" ]), $msg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment