試圖做的時候我遇到了問題:驗證與onlyIf不起作用
newNoteText: ko.observable().extend({ required: { onlyIf: function() { return this.ShowNote == true } } })
我注意到,這是不行的,但是當我把代碼發回這樣的,它工作正常:
newNoteText: ko.observable().extend({ required: true })
https://skydrive.live.com/redir?resid=33048714B5BF3B4B!2027
嘗試與param沒有工作。我將嘗試創建一個示例。 – jmogera 2013-02-27 05:05:06
這裏是例子。我完全按照我的項目創建測試項目:https://skydrive.live.com/redir?resid=33048714B5BF3B4B!2027 – jmogera 2013-03-01 14:01:02