correct handle the 'params' arg#593
correct handle the 'params' arg#593languanghao wants to merge 2 commits intoKnockout-Contrib:masterfrom
Conversation
upgrade to latest
ko.intValue.extend({min:{
params: 3,
message: 'some messages'
}})
Above code won't work correct, because the code not correct handle the params, the 'min' validator get the params as a object, not the 'params' value 3.
|
@languanghao Can you provide an example where the rule does not work? Thanks. Working example http://jsfiddle.net/crissdev/9xqmrLs8/ |
|
@crissdev I have update the code. The code below dose not work as excepted. I am writing a wtforms extentions with ko validation. In my code, I need to dynamic add validation rules to ko fields. My code like this: I foud my problem was occurred because code of |
|
Thanks for all the info. I believe this feature is already implemented in Here's the updated example which uses the library from that branch http://jsfiddle.net/crissdev/9xqmrLs8/1/ |
ko.intValue.extend({min:{
params: 3,
message: 'some messages'
}})
Above code won't work correct, because the code not correct handle the params, the 'min' validator get the params as a object, not the 'params' value 3.