0
votes

I have my jsfiddle here:

The problem is that the required field messages are showing when we hover over the "*" template, but when we entered invalid characters in the input box, the error message still remains one of required field rather Invalid characters or length of the fields.

Am I missing anything?

Thanks

1

1 Answers

0
votes

Got it, after 20 minutes of stripping down the code. You owe me a beer. Just move this init piece at the top of the code, before any observables are initialized.

// Knockout validation configuration.
ko.validation.init({
    insertMessages: true,
    messageTemplate: 'vmTemplate',
});

fiddle: http://jsfiddle.net/tRVCr/3/