Reputation: 808
In base PasswordResetRequestForm model:
public function rules()
{
return [
['email', 'exist',
'targetClass' => '\common\models\User',
'filter' => ['status' => User::STATUS_ACTIVE],
'message' => 'Such user is not registered. '.BaseHtml::a('Signup.',['site/signup'])
],
];
}
But link renders encoded. How to force it not to be encoded? Where should I do it, in ActiveForm, in field config, or in validation rule?
Upvotes: 5
Views: 3450
Reputation: 25312
You can configure this on ActiveForm :
<?php $form = ActiveForm::begin([
'encodeErrorSummary' => false,
]); ?>
Read more : http://www.yiiframework.com/doc-2.0/yii-widgets-activeform.html#$encodeErrorSummary-detail
Upvotes: 0
Reputation: 120
I don't know about the past, but now you can configure it in the fieldConfig:
$form = ActiveForm::begin([
'fieldConfig' => [
'errorOptions' => ['encode' => false],
],
]);
Upvotes: 5