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