Yii for beginners 2

Comparing #42 with #43

Revision #43 was created by rackycz rackycz on Mar 17, 2022, 10:45:07 AM.

Each validator

Content

[...]
2nd = defaultScope()

3rd = custom scope

17. Each validator (see Yii2)
------------------------------------

If you need the "each validator" (for validating array of values) which is available in Yii2, you paste this method to your model and use it as the validator. Do not forget to specify validation rules for the particular values as well! See examples below.

```php
[...]