Closed tpever closed 12 years ago
@tpever
Could you put together the code you have in a jsFiddle or gist so I could see what syntax you are using?
Hi,
Please have a look at the snapshot of script given below.
Hope above code snapshot helps you to determine the problem.
Thanks a lot.
Hope you are able to trace the issue, please let me know.
Thanks and regards
@tpever
I don't see a call to the 'group' function in your code. Could you take what you pasted and get it working in jsFiddle (www.jsFiddle.net) ? It would be much more helpful to me if you could replicate what you are running into in that, and then just paste the link here so I can look at it on my side.
I'm glad to fix any issues that you are running into related to this plugin, but from this source I cannot tell where your issue might be stemming from (either ko.validation or the autonumeric plugin)
Thanks for reply, please have a look at Url http://jsfiddle.net/Q8xC8/3/
Based on my understanding it seems issue using any custom binding or extension, the valueAccessor() is not set and due to that couldn't add span tag and and hence message is not getting display,
May be issue at utils.isValidatable(valueAccessor())) if (config.insertMessages && utils.isValidatable(valueAccessor())) at registerValueBindingHandler
Again thanks for your help.
Thanks!
Inserting validation messages only works with the value
binding in KO. It looks like your autonumeric
binding doesn't utilize the value
binding internally. I think this is a good use case for the validationMessage
binding... see the fiddle:
Let me know if that works for you
Thanks a lot for reply,
ya it seems validation scripts only works with the value bindings. Thanks a lot for pointing me the actual issue, in custom binding "value" binding is not utilized updated it and seems working for this case.
Still I am evaluating KOVaidation and KOGrid for very complex form having more then 100 fields and complex business rules. and going to use multiple KO extension and subscribable objects. It will be difficult to add separate span for each field while design the form i might have to find some work around for same.
Again many thanks for help.
try use ko.validation.makeBindingHandlerValidatable("autoNumeric")
Hi,
I was doing some evaluation about knockoutjs and validation, Thanks for your plugin it is really helpful.
One use case seems not working in my case - i have used autonumeric extension from (https://gist.github.com/1341303) When i apply validation rules to autonumeric field in ko.validation.group(model) it gives error message properly. but somehow it is not showing on screen.
can you please help me out for this.
Thanks and regards