How to switch on\off frontend form validation for some fields in yii2?

后端 未结 6 2405
伪装坚强ぢ
伪装坚强ぢ 2021-02-19 23:10

I have got difficult form in yii2 view, where some fields show or hide. It decide from user field choises, select options in the form. I write this frontend logic with custom jq

6条回答
  •  梦谈多话
    2021-02-20 00:06

    To disable client side validation. Begin your active form like this.

    ActiveForm::begin(['enableClientValidation'=>false]);
    

提交回复
热议问题