Where To Find Model's Method?

App-Advanced, PasswordResetRequestForm model:

public function rules()


        return [

            ['email', 'filter', 'filter' => 'trim'],

            ['email', 'required'],

            ['email', 'email'],

            ['email', 'exist',

                'targetClass' => '\common\models\User',

                'filter' => ['status' => User::STATUS_ACTIVE],

                'message' => 'There is no user with such email.'




Where to find "exist" method?

“\common\models\User” hasn’t it.

And i can’t find it in parent class.

Its better, if you can read the Yii2 docs and guide about Model, ActiveRecord, and Model Validation Rules.

Exist is a model validator, you can read about it here. This is similar to the other validators like required, email, filter etc. that you have in your model validation rules in your example above.

Thank you for answer