models/CallbackForm.php
/**
     * @return array the validation rules.
     */
@return array the validation rules.
@return array the validation rules .
public function rules()
    {
        return [
            [['name', 'phone'], 'required'],
            [['name', 'phone'], 'string'],
            [['reCaptcha'], ReCaptchaValidator2::class, 'uncheckedMessage' => Yii::t('app', 'Please confirm that you are not a bot.')],
        ];
    }
public function rules ( ) { return [ [ [ 'name' , 'phone' ] , 'required' ] , [ [ 'name' , 'phone' ] , 'string' ] , [ [ 'reCaptcha' ] , ReCaptchaValidator2 :: class , 'uncheckedMessage' => Yii :: t ( 'app' , 'Please confirm that you are not a bot.' ) ] , ] ; }
@return array the validation rules.
@return array the validation rules .