Getting unknown property:

When I save a User it says

[b]Unknown Property – yii\base\UnknownPropertyException

Getting unknown property: app\models\User::password, repeatPassword, email[/b]

What should I do?

Finally I could solve the problem. It was because in the rules method i had this (Yii 1 notation):


	public function rules()

	{

		return array(

                       array('password, repeatPassword, email', 'string', 'length' => array(6, 100)),

		);

	}

and it should be this (Yii 2 notation):


	public function rules()

	{

		return array(

                       array(array('password', 'repeatPassword', 'email'), 'string', 'length' => array(6, 100)),

		);

	}