validators\DateValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\DateValidator $type

$type public property (available since version 2.0.8) The type of the validator. Indicates, whether a date, time or datetime value should be validated. This property influences the default value of $format and also sets the correct behavior when $format is one of the intl short formats, short, medium, long, or full. This is only effective when the PHP intl extension is installed. This property can be set to the following values: TYPE_DATE - (default) for validating date values only, that m

validators\DateValidator init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

validators\DateValidator $tooBig

$tooBig public property (available since version 2.0.4) User-defined error message used when the value is bigger than $max. public string $tooBig = null

validators\DateValidator $tooSmall

$tooSmall public property (available since version 2.0.4) User-defined error message used when the value is smaller than $min. public string $tooSmall = null

validators\DateValidator $timeZone

$timeZone public property The timezone to use for parsing date and time values. This can be any value that may be passed to date_default_timezone_set() e.g. UTC, Europe/Berlin or America/Chicago. Refer to the php manual for available timezones. If this property is not set, yii\base\Application::$timeZone will be used. public string $timeZone = null

validators\DateValidator $timestampAttributeTimeZone

$timestampAttributeTimeZone public property (available since version 2.0.4) The timezone to use when populating the $timestampAttribute. Defaults to UTC. This can be any value that may be passed to date_default_timezone_set() e.g. UTC, Europe/Berlin or America/Chicago. Refer to the php manual for available timezones. If $timestampAttributeFormat is not set, this property will be ignored. See also $timestampAttributeFormat. public string $timestampAttributeTimeZone = 'UTC'

validators\DateValidator $timestampAttributeFormat

$timestampAttributeFormat public property (available since version 2.0.4) The format to use when populating the $timestampAttribute. The format can be specified in the same way as for $format. If not set, $timestampAttribute will receive a UNIX timestamp. If $timestampAttribute is not set, this property will be ignored. See also: $format $timestampAttribute public string $timestampAttributeFormat = null

validators\DateValidator $timestampAttribute

$timestampAttribute public property The name of the attribute to receive the parsing result. When this property is not null and the validation is successful, the named attribute will receive the parsing result. This can be the same attribute as the one being validated. If this is the case, the original value will be overwritten with the timestamp value after successful validation. Note, that when using this property, the input value will be converted to a unix timestamp, which by definition

validators\DateValidator $maxString

$maxString public property (available since version 2.0.4) User friendly value of upper limit to display in the error message. If this property is null, the value of $max will be used (before parsing). public string $maxString = null