AngularJS - Server side validation and client side forms

前端 未结 8 759
忘了有多久
忘了有多久 2020-12-12 11:40

I am trying to understand how to do the following things:

What is the accepted way of declaring a form. My understanding is you just declare the form in HTML, and ad

8条回答
  •  被撕碎了的回忆
    2020-12-12 12:02

    Well, the Answer Derek Ekins gave is very nice to work on. But: If you disable the submit button with ng-disabled="myForm.$invalid" - the button will not automatically go back to enabled as the server-based error state doesn't seem to be changed. Not even if you edit ALL fields in a form again to comply with valid inputs (based on client side validation).

提交回复
热议问题