Knockout-Validation icon indicating copy to clipboard operation
Knockout-Validation copied to clipboard

setError doesn't update/show the error message unless isModified is called

Open joshsalverda opened this issue 8 years ago • 0 comments

If the value is not modified before setError is called then you must also call isModified afterwards. I didn't find this documented anywhere (it was pointed out on stack overflow http://stackoverflow.com/questions/12491069/can-i-manually-add-error-messages-in-knockout-validation) so it seems like incorrect behaviour to me.

Example can be seen at http://jsfiddle.net/fq1098pu/. Uncomment the isModified line to see that this fixes the issue, but probably shouldn't be necessary.

joshsalverda avatar Oct 02 '15 18:10 joshsalverda