【发布时间】:2014-12-03 14:15:32
【问题描述】:
我在淘汰和验证方面遇到问题。发生错误时,我想为我的输入着色。
问题是当我使用github上的knockout.validation库时,出现错误:
{"error": "Please use POST request"}
见:http://jsfiddle.net/kd2haczL/3/
ko.validation.configure({
insertMessages: false,
decorateElement: true,
errorElementClass: 'error'
});
而且当我从 CDN 使用时,没有错误,但着色不起作用。
见:http://jsfiddle.net/kd2haczL/1/
谢谢。
【问题讨论】:
标签: knockout.js knockout-validation