diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index 596d27eba7..e370df196d 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -440,7 +440,9 @@ If you are interested in the attribute values prior to their most recent modific > even if it has the same value but a different type. This is often the case when the model receives user input from > HTML forms where every value is represented as a string. > To ensure the correct type for e.g. integer values you may apply a [validation filter](input-validation.md#data-filtering): -> `['attributeName', 'filter', 'filter' => 'intval']`. +> `['attributeName', 'filter', 'filter' => 'intval']`. This works with all the typecasting functions of PHP like +> [intval()](http://php.net/manual/en/function.intval.php), [floatval()](http://php.net/manual/en/function.floatval.php), +> [boolval](http://php.net/manual/en/function.boolval.php), etc... ### Default Attribute Values diff --git a/docs/guide/input-validation.md b/docs/guide/input-validation.md index ad65375870..24d9872864 100644 --- a/docs/guide/input-validation.md +++ b/docs/guide/input-validation.md @@ -219,7 +219,7 @@ with a PHP callable. For example, }] ``` -> Note: Most validators do not handle empty inputs if their [[yii\base\Validator::skipOnEmpty]] property takes +> Note: Most validators do not handle empty inputs if their [[yii\validators\Validator::skipOnEmpty]] property takes the default value true. They will simply be skipped during validation if their associated attributes receive empty inputs. Among the [core validators](tutorial-core-validators.md), only the `captcha`, `default`, `filter`, `required`, and `trim` validators will handle empty inputs.