0
驗證期間,我可以在yii2中顯示提示嗎? 在我的模型,我有:Yii2驗證時顯示提示
public function rules()
{
return [
[['content'], 'checkLastCommentDate', 'skipOnEmpty' => false, 'skipOnError' => false],
];
}
public function checkLastCommentDate($attribute)
{
if (true) {
//can set hint here?
}
}
沒有,yii2有類似的提示,但我不能確認使用它。也許它不應該在驗證?我只想顯示提示$ vat == 5 –