CDefaultValueValidator sets the attributes with the specified value.
It does not do validation but rather allows setting a default value at the
same time validation is performed. Usually this happens when calling either
$model->validate() or $model->save().
whether to set the default value only when the attribute value is null or empty string.
Defaults to true. If false, the attribute will always be assigned with the default value,
even if it is already explicitly assigned a value.
value
property
public mixed $value;
the default value to be set to the specified attributes.
Be the first person to leave a comment
Please login to leave your comment.