Difference between #105 and #106 of
Yii v2 snippet guide

Revision #106 has been created by rackycz on Sep 21, 2019, 6:43:25 AM with the memo:

edit
« previous (#105) next (#107) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
}

```

Validators vs JavaScript:
- There are 2 types of validators. All of them are used in method **rules**, but as you can see, the validator **setPasswordWhenChanged** is my custom validator and needs a special method.
 *(I just abused a validator to set the password value, no real valiation happens inside)*
- If a validator does not need this special method, it is automatically converted into JavaScript and is used on the web page when you are typing.
- If a validator needs the method, it cannot be converted into JavaScript so the rule is checked only in the moment when user sends the form to the server - after successful JavaScript validation.

Now you can also create **CRUD** using GII:
[...]
2 0
1 follower
Viewed: 11 550 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 29 days ago
Update Article

Revisions

View all history