more docs for #10701

This commit is contained in:
Carsten Brandt
2016-01-29 20:59:02 +01:00
parent e7cc447c0d
commit 8da214d264
2 changed files with 4 additions and 2 deletions

View File

@ -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 <span id="default-attribute-values"></span>

View File

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