I'm a newbie when it comes to using knockout, I really want to maximize it's usage in the web that I am developing. But I am having concerns when it comes to the browsers capability to listen to multiple user events. I believe that knockout implements a property called valueupdate. So far, I have only used 'afterkeydown' and 'blur'. But I need my browser to listen to multiple events at the same time. Below are the user events that my browser should listen to:
- On page load, I want my input fields to start validating on page load.
- On blur, I want my input fields to validate after it losts focus.
- After key down, I also want my fields to re-validate them selves after the user presses a key.
- On submit, though my fields are not wrapped in a form, I still want to validate my fields, after the user clicks the "Save" button.
I'm thinking of something like this:
<input data-bind="value:someObservable, valueUpdate:'blur' + 'afterKeyDown' + 'onLoad' + 'onClickOfSaveButton'" />
--> Something like that, though I know this will cause a syntax error, but I hope you get my point.
I know, this question is kinda confusing, but if you want more details, please don't hesitate to specify it on your comment. I really need help here. Thanks.