Difference between #43 and #44 of
Yii for beginners 2

Revision #44 has been created by rackycz on Mar 17, 2022, 10:45:56 AM with the memo:

Each validator
« previous (#43)

Changes

Title unchanged

Yii for beginners 2

Category unchanged

Tutorials

Yii version unchanged

1.1

Tags unchanged

Yii,mvc,tutorial,beginner

Content changed

[...]
3rd = custom scope

Each validator (see Yii2)
------------------------------------

If you need the "each validator" (for validating array of values) which is available in Yii2, you
can 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
public function each($attribute, $params)
{
$attr = $this->$attribute;
[...]
15 0
21 followers
Viewed: 87 710 times
Version: 1.1
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Mar 5, 2013
Last updated: 2 years ago
Update Article

Revisions

View all history