How to manually trigger AngularJS validation from a button outside of the form tags?

后端 未结 6 1247
滥情空心
滥情空心 2020-12-25 11:45

Given this code:

Header inputs:
6条回答
  •  一整个雨季
    2020-12-25 12:33

        for (control of $scope.[form name].$$controls) {
            control.$setDirty();
            control.$validate();
        }
    

    You can try the above codes. Make it running before submit.

提交回复
热议问题