Clearing or resetting a knockout validation validatedObservable?

前端 未结 2 605
情深已故
情深已故 2021-02-07 14:36

I have a view model as such:

var prop1 = ko.observable().extend{ required: true },
    prop2 = ko.observable().extend{ req         


        
2条回答
  •  花落未央
    2021-02-07 14:50

    When using a validated observable, I found out that you can call validatedObservable.errors.showAllMessages(false) after you have cleared the observable, which is behaving the way I was expecting in my application.

提交回复
热议问题