Browse Source

Fixes #5169.

tags/2.0.0-rc
Qiang Xue 10 years ago
parent
commit
6bef0e628d
  1. 8
      docs/guide/tutorial-core-validators.md

8
docs/guide/tutorial-core-validators.md

@ -105,9 +105,11 @@ This validator checks if the input value is a date, time or datetime in a proper
Optionally, it can convert the input value into a UNIX timestamp and store it in an attribute
specified via [[yii\validators\DateValidator::timestampAttribute|timestampAttribute]].
- `format`: the date/time format that the value being validated should be in. Please refer to the
[PHP manual about date_create_from_format()](http://www.php.net/manual/en/datetime.createfromformat.php)
for details about specifying the format string. The default value is `'Y-m-d'`.
- `format`: the date/time format that the value being validated should be in.
This can be a date time pattern as described in the [ICU manual](http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax).
Alternatively this can be a string prefixed with `php:` representing a format that can be recognized by the PHP
`Datetime` class. Please refer to <http://php.net/manual/en/datetime.createfromformat.php> on supported formats.
If this is not set, it will take the value of `Yii::$app->formatter->dateFormat`.
- `timestampAttribute`: the name of the attribute to which this validator may assign the UNIX timestamp
converted from the input date/time.

Loading…
Cancel
Save